I need help coming up with a regex to make sure the user enters a valid date The string will be in the format of mm/dd/yyyy
mm/dd/yyyy
Here is what I have come up
Regex for 0-31:
(0[1-9]|[12]\d|3[01])
Or if you don't want days with a preceding zero (e.g. 05):
([1-9]|[12]\d|3[01])