I dont (need to) care about performance!
My regex matches the date format dd.mm.yyyy
((([0][1-9]|[12][\d])|[3][01])[./]([0][13578]|[1][02])[./][1-9]\d\d\d)|((([0][1-9]|[12][\d])|[3][0])[./]([0][13456789]|[1][012])[./][1-9]\d\d\d)|(([0][1-9]|[12][\d])[-/][0][2][./][1-9]\d([02468][048]|[13579][26]))|(([0][1-9]|[12][0-8])[./][0][2][./][1-9]\d\d\d)
Here are the dates my regex does not match yet. Any help appreciated.
09. Juni 1997
01.Aug.1995
27.06. 1997
29.02.1996
21. 01. 1999
28.05. 1996
07..4..1995
20:03:1998
9.4.1997
14 .03 - 1995
I started out by trying to add the month letters but failed (probably because of the whitespaces between them)
here is a regex that validates the months' letter order (Januar, Februar, März, April, Mai, Juni, August, September, Oktober, November, Dezember)
(?:J(anuar|u(n|li))|Februar|Mä(rz|i)|A(pril|ugust)|(((Sept|Nov|Dez)em)|Okto)ber)
I found this on the internet, which focusses on the issue if only 3 letters of the months are availiable
(((([1-9])|([0][1-9])|([1-2][0-9])|(30))\-([A,a][P,p][R,r]|[J,j][U,u][N,n]|[S,s][E,e][P,p]|[N,n][O,o][V,v]))|((([1-9])|([0][1-9])|([1-2][0-9])|([3][0-1]))\-([J,j][A,a][N,n]|[M,m][A,a][R,r]|[M,m][A,a][Y,y]|[J,j][U,u][L,l]|[A,a][U,u][G,g]|[O,o][C,c][T,t]|[D,d][E,e][C,c])))\-[0-9]{4}$)|(^(([1-9])|([0][1-9])|([1][0-9])|([2][0-8]))\-([F,f][E,e][B,b])\-[0-9]{2}(([02468][1235679])|([13579][01345789]))$)|(^(([1-9])|([0][1-9])|([1][0-9])|([2][0-9]))\-([F,f][E,e][B,b])\-[0-9]{2}(([02468][048])|([13579][26]))