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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Date - US Format
Expression
^((0?[2])/(0?[1-9]|[1-2][0-9])|(0?[469]|11)/(0?[1-9]|[1-2][0-9]|30)|(0?[13578]|1[02])/(0?[1-9]|[1-2][0-9]|3[0-1]))/([1][9][0-9]{2}|[2-9][0-9]{3})$
Description
Accepts dates in the format MM/DD/YYYY. Month and day can have preceeding 0 if less than 10, year is 1900-9999 and months accept 30/31 days appropriately. February accepts 29 (leap year not factored in).
Matches
1/31/2010, 11/04/1941, 04/30/2991
Non-Matches
4/31/2003, 13/22/1999, 2/30/2010
Author Rating: Not yet rated. Nathon Dalton
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-2018, RegexAdvice.com | ASP.NET Tutorials