Charles Baldo
asked on
Need regex for proper date
I have this expression in a <asp:RegularExpressionVali dator control
(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01] )[- /.](19|20)\d\d
It has a problem with the date. It will allow any day in any month up to the 31. Is there a regex for a "Valid Date" format I need it in mm/dd/yyyy format.
Leap year would be super great to catch
Thanks
chuck
(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01]
It has a problem with the date. It will allow any day in any month up to the 31. Is there a regex for a "Valid Date" format I need it in mm/dd/yyyy format.
Leap year would be super great to catch
Thanks
chuck
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Thanks for the assist, and the points.
Good luck & have a great day.
Good luck & have a great day.
ASKER