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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^([0]?[1-9]|[1][0-2])[./-]([0]?[1-9]|[1|2][0-9]|[3][0|1])[./-]([0-9]{4}|[0-9]{2})$
Description
Validate american date formats: mm/dd/yyyy or m/d/yy or m.d.yyyy with separators: . - / Valid dates only! m (1-12)/ d (1-31)/ y (0..) (rizzipereira.com.br) For Brazilian date format: http://www.regexlib.com/REDetails.aspx?regexp_id=250
Matches
10.03.1979 | 12/30/2004 | 01/01/2004
Non-Matches
09--02--2004 | 15-15-2004 | 13/12/2004
Author Rating: The rating for this expression. Diego dos Santos
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: errrr
Name: piper
Date: 3/12/2015 8:39:03 AM
Comment:
Wow thnx man, now i can finally validate wonderful dates like these: 01-|1-2001 01-3|-2001


Title: errrr
Name: piper
Date: 3/12/2015 8:38:52 AM
Comment:
Wow thnx man, now i can finally validate wonderful dates like these: 01-|1-2001 01-3|-2001


Title: Doesn't work for february
Name: Daniel
Date: 12/19/2007 10:16:02 AM
Comment:
when I tried to test for february it doesn't validate(check 02/31/2000)


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