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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^(\d{2}((0[1-9]|1[012])(0[1-9]|1\d|2[0-8])|(0[13456789]|1[012])(29|30)|(0[13578]|1[02])31)|([02468][048]|[13579][26])0229)$
Description
yyMMdd with leap years. Minimized expression. As we have only 2 numbers for the years, dates 1600, 2000, etc are still validated.
Matches
001231 | 000229 | 040229
Non-Matches
003112 | 000431 | 010229
Author Rating: The rating for this expression. Dany Lauener
Source Dany Lauener
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: cbnfghf
Name: hgfhgfhg
Date: 7/15/2014 2:39:12 AM
Comment:
ghgfhgfhgfhg


Title: Check twice please, it works
Name: Dany Lauener
Date: 1/16/2006 6:16:51 AM
Comment:
If you use the test link above en enter 040230 (2004 Feb 30th), it is rejected (Non-match). No idea how you have tested it...


Title: Mr.
Name: Vijay Kumar
Date: 1/16/2006 5:01:14 AM
Comment:
I tried 040230 which is invalid should be Non-match.


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