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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Gregorian Date with month names and leap year support
Expression
^(0[1-9]|[12][0-9]|3[01])[\s\.\-/](J(anuary|uly|an|AN)|M(arch|ar|AR|ay|AY)|A(ugust|ug|UG)|(O(ctober|ct|CT)|(D(ecember|ec|EC))))[\s\.\-/][1-9][0-9]{3}|(0[1-9]|[12][0-9]|30)[\s\.\-/](A(pril|pr|PR)|J(une|un|UN)|S(eptember|ep|EP)|N(ovember|ov|OV))[\s\.\-/][1-9][0-9]{3}|(0[1-9]|1[0-9]|2[0-8])[\s\.\-/]F(ebruary|eb|EB)[\s\.\-/][1-9][0-9]{3}|29[\s\.\-/]F(ebruary|eb|EB)[\s\.\-/]((0[48]|[2468][048]|[13579][26])00|[0-9]{2}(0[48]|[2468][048]|[13579][26]))$
Description
Verifies all valid Gregorian dates of the form DD MONTH YYYY, and short month names, taking days/month and leap years into account. Accepts space, -, . and / between paramters.
Matches
05 March 2012 | 29-Feb-2012 | 31.DEC.2011
Non-Matches
32 March 2012 | 29-Feb-2011 | 2011.DEC.31
Author Rating: The rating for this expression. Paul Kochanowsky
Source Paul Kochanowsky
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