RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details MySQL Date
Expression
^(19|20)[0-9]{2}-((01|03|05|07|08|10|12)-(0[1-9]|[12][0-9]|3[01]))|(02-(0[1-9]|[12][0-9]))|((04|06|09|11)-(0[1-9]|[12][0-9]|30))$
Description
Checks for a MySQL valid date formated as Y-M-D. January, March, May, July, August, Octobe and December are valid with max of 31 days, February is valid with max of 29 days, April, June, September and November are valis with max of 30 days. Valid for years from 1900 to 2099.
Matches
2012-12-31 | 1999-01-29 | 1995-06-01
Non-Matches
2012-02-30 | 1999-04-31 | 1872-06-01
Author Rating: Not yet rated. Ilia Goranov
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials