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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Date (dd-mm-yy[yy])
Expression
^[0-3]{1}(?(?<=3)[01]{1}|\d)([-.\/]{1})[01]{1}(?(?<=1)[0-2]{1}|\d)\1(\d{2}|\d{4})$
Description
Limits days to 31 and months to 12. Hyphen, dot and slash are valid separators and have to be consistent.
Matches
31-02-2009 | 17.06.3005 | 05/03/98
Non-Matches
22-14-2010 | 16/05-2004 | 36.10.94 | 5-4-3000
Author Rating: Not yet rated. Christof Verhoeven
Source
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

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