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[012])/(0[1-9]|1\d|2[0-8])|(0[13456789]|1[012])/(29|30)|(0[13578]|1[02])/31)/[2-9]\d{3}|02/29/(([2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00)))$
Description
MM/dd/yyyy with 100% leap year validation starting from year 2000. If this one doesn't fit your needs, just tell me. Sorry for starting "only" from year 2000, this is so simple to change this, please ask if needed. Enjoy
Matches
02/29/2000 | 02/29/2004 | 12/31/2001
Non-Matches
02/29/2100 | 02/29/2001 | 1/1/2001
Author Rating: The rating for this expression. Dany Lauener
Source Dany Lauener
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: Need more support years
Name: Suresh
Date: 2/6/2018 10:28:27 AM
Comment:
Hi.. Your regex is working like a charm.. but i need to work years between 1753-9999 . Can you please change the year. And when you will complete please mail me the regex for me. My mail ID : [email protected]


Title: unterminated parenthetical
Name: Bonji
Date: 6/23/2010 2:40:49 PM
Comment:
why does firebug return unterminated parenthetical when using this regex? Please help. Thanks


Title: unterminated parenthetical
Name: Bonji
Date: 6/23/2010 2:40:29 PM
Comment:
why does firebug return unterminated parenthetical when using this regex? Please help. Thanks


Title: 2000 t0 1700
Name: Devi
Date: 1/27/2010 5:48:24 AM
Comment:
can you change this to 1700 instead of 2000


Title: 2000 t0 1700
Name: Devi
Date: 1/27/2010 5:46:23 AM
Comment:
can you change this to 1700 instead of 2000


Title: 2000 t0 1700
Name: Devi
Date: 1/27/2010 5:43:01 AM
Comment:
can you change this to 1700 instead of 2000


Title: 2000 t0 1700
Name: Devi
Date: 1/27/2010 5:42:28 AM
Comment:
can you change this to 1700 instead of 2000


Title: question
Name: alex
Date: 11/8/2006 4:23:56 PM
Comment:
What do we need to extend this script to use date prior to 2000?


Title: MM/dd/yyyy
Name: lloyd
Date: 11/30/2005 5:03:28 AM
Comment:
can u change starting year from 2000 to 1900 please


Title: MM/dd/yyyy
Name: lloyd
Date: 11/30/2005 5:02:33 AM
Comment:
can u change the starting year from 2000 to 1900


Title: M/D/yyyy
Name: Dany Lauener
Date: 4/28/2005 4:51:11 PM
Comment:
Sorry, here is the link : http://www.regexlib.com/REDetails.aspx?regexp_id=1071


Title: M/D/yyyy
Name: Dany Lauener
Date: 4/28/2005 4:38:26 PM
Comment:
Here is a validator for MM + DD with 1 and/or 2 digits. For year before 2000, send me an email.


Title: Question
Name: SavageIdeas
Date: 4/28/2005 2:02:25 PM
Comment:
Is there a way to allow for 1 or 2 digit MM or DD values? Also, how would the regex need to be changed to allow for dates prior to 2000, such as 1900? Thanks.


Title: great!
Name: gel
Date: 3/29/2005 8:18:52 PM
Comment:
thank you very much!


Title: Cool
Name: Topio user
Date: 3/29/2005 6:41:37 AM
Comment:
Simply smaler than the others ! Well done.


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