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[1-9])|([1-31]))\/((\d{2})|(\d{4}))$
Description
Matches U.S. dates with leading zeros and without and with 2 or four digit years
Matches
01/01/2001 | 1/1/2001 | 01/1/01
Non-Matches
13/01/2001 | 1/2/100 | 09/32/2001
Author Rating: The rating for this expression. Chris Becker
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: Does not match 12/20/04
Name: cmh
Date: 2/12/2004 10:08:07 AM
Comment:
Why doesn't it match 12/20/04


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