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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Date with Leap year verification
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)/(19|[2-9]\d)\d{2}|0?2/29/((19|[2-9]\d)(0[48]|[2468][048]|[13579][26])|(([2468][048]|[3579][26])00)))$
Description
This Expression verifies all the valid date in the US Date Format.It also checks the leap year.we can use this expression with or with out the prefix of zero in the date column and month column Eg[01/02/2008 or 1/2/2008].It accepts date which are greater than the year 1900.I can assure that this will be useful for all the developers who are searching for Date entry
Matches
02/29/1984;10/9/2000;1/1/2009
Non-Matches
02/02/1899;13/02/2000;02/29/2001;02-29-2000
Author Rating: The rating for this expression. Ali Kaleth Quraizy
Source My Brain
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-2025, RegexAdvice.com | ASP.NET Tutorials