I am using this next pattern for HTML (0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d
.
I want exactly the same pattern for PHP preg_match()
for server-side validation. Does someone know this? Is there some kind of converter or something.
The pattern is for 12/12/1999
and also 12-12-1999
and as you can see it only allows year 1900 and 2000.
I searched online for the pattern, but I couldn't find the combination pattern on having 12/12/1999
and also 12-12-1999
+ 1900 and only the year 2000.
And does someone know a good website to convert these kind of things or to make preg_match PHP or patterns HTML?