I want to check the European date formats, for example, "10.02.2012" or "10-02-2012". So I created the following regular expression:
/\d[0-9]{2}(.|-)\d[0-9]{2}(.|-)\d[0-9]{4}/
Unfortunately, I always get the message invalid, even if the date is in the correct format.
When I replace "(. | -)" with "." to check only dates separated by the point with which it works. So I guess the problem should be "(. | -)" Any ideas?
source share