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 Pattern Title
Expression
^\d{4}[\-\/\s]?((((0[13578])|(1[02]))[\-\/\s]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\-\/\s]?(([0-2][0-9])|(30)))|(02[\-\/\s]?[0-2][0-9]))$
Description
- validates a yyyy-mm-dd, yyyy mm dd, or yyyy/mm/dd date - makes sure day is within valid range for the month - does NOT validate Feb. 29 on a leap year, only that Feb. CAN have 29 days
Matches
0001-12-31 | 9999 09 30 | 2002/03/03
Non-Matches
0001\02\30 | 9999.15.01 | 2002/3/3
Author Rating: The rating for this expression. Rex Po
   Displaying page 1 of 1 pages; Items 1 to 1

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