A world of Programming- Gsbprogramming
By Er Gurpreet Singh, Senior Software Engineer, Sopra Steria India
Labels
About
ASP.NET
C&Cpp
C#
CSS
GK
Java
Java EE
JQuery
Notes
Oracle apps
OS
Others
PL/SQL
Programming Quiz
SQL
Thursday, 29 January 2015
Regular Expression for validating Dates
Regular expression for validating dates is:
^\s*((31([-/ ])((0?[13578])|(1[02]))\3(\d\d)?\d\d)|((([012]?[1-9])|([123]0))([-/ ])((0?[13-9])|(1[0-2]))\12(\d\d)?\d\d)|(((2[0-8])|(1[0-9])|(0?[1-9]))([-/ ])0?2\22(\d\d)?\d\d)|(29([-/ ])0?2\25(((\d\d)?(([2468][048])|([13579][26])|(0[48])))|((([02468][048])|([13579][26]))00))))\s*$
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment