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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^(([1-9])|(0[1-9])|(1[0-2]))\/(([0-9])|([0-2][0-9])|(3[0-1]))\/(([0-9][0-9])|([1-2][0,9][0-9][0-9]))$
Description
Dates day: d or dd, <= 31, month: m or mm, <= 12, year: yy or yyyy >= 1900, <= 2099
Matches
01/01/2001 | 1/1/1999 | 10/20/2080
Non-Matches
13/01/2001 | 1/1/1800 | 10/32/2080
Author Rating: The rating for this expression. Scott Thompson
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

Title: unrealistic match
Name: Mark
Date: 10/23/2013 6:24:06 AM
Comment:
match: 2999


Title: Accepts 1001 for year
Name: Ecyrb
Date: 5/4/2009 6:03:44 PM
Comment:
Accepts 01/01/1001. That's quite a bit less than 1900.


Title: [0,9] should be [09]
Name: Ecyrb
Date: 5/4/2009 5:52:45 PM
Comment:
The part that matches the date has [0,9]. The comma should be removed. As is, it will consider 01/01/2,01 a valid date with the year being "2,01".


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