Instead of using a regular expression, you could use the parseDateTime
variant that returns a default value if parsing fails, like this:
parseDateTime($inputString, 'dd-MM-yyyy', empty)
This will yield a date if parsing the string succeeds, and an empty value otherwise. Afterwards you can check if the value is empty to know whether parsing succeeded.
^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$
from regexbuddy
Note, that your question is not related to mendix. You can easily search on google. This one should work:
^(0[1-9]|[12][0-9]|3[01])[-](0[1-9]|1[012])[-](19|20)\d\d$
BTW: you can easily check your regex with: http://regexpal.com/