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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find MMM dd, yyyy Date
Expression
^(?:(((Jan(uary)?|Ma(r(ch)?|y)|Jul(y)?|Aug(ust)?|Oct(ober)?|Dec(ember)?)\ 31)|((Jan(uary)?|Ma(r(ch)?|y)|Apr(il)?|Ju((ly?)|(ne?))|Aug(ust)?|Oct(ober)?|(Sept|Nov|Dec)(ember)?)\ (0?[1-9]|([12]\d)|30))|(Feb(ruary)?\ (0?[1-9]|1\d|2[0-8]|(29(?=,\ ((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))))))\,\ ((1[6-9]|[2-9]\d)\d{2}))
Description
This RE validate Dates in the MMM dd, yyyy format from Jan 1, 1600 to Dec 31, 9999. The format is as follows: The name or 3 letter abbreivation, without a period, of the month, then a space then the day value then a comma then a space finally the year. The correct number of day are validated for each month include leap years. The name of month is case sensitive.
Matches
Jan 1, 2003 | February 29, 2004 | November 02, 3202
Non-Matches
Feb 29, 2003 | Apr 31, 1978 | jan 33,3333
Author Rating: The rating for this expression. Michael Ash
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: ghthtyrhtyrxyythjgvgfc
Name: gfjfghxfjrut67i87r5du6ysrktyuytr5eud4ruvi86otr 6u45l7e57e
Date: 5/26/2023 2:17:15 PM
Comment:
ijrmfgnbarjhgbrwabvrkjwgriang bfm,v fabnkdnfm,fmr mbgf.nv dsyxgfdxdftfdcfgfvcghuhghygfvcfgygfcfghuiuyhghyuiygthyujiygtfghyujyhgtfdfgtyutfrdsdfrty6trdefrgtyui8ygtfrvgtytresazsdftyuygtfrdefghjikjuhygtfdrgtyuiuhygtfdfgopoiuhygfgyu8iuytfrdfrtyu8iuytfrdsefrty7uytrderftyuioplijuhgfrtyuiytfrdesderfty0poiugfdfrgty7uy6t5r4ewser5t6787y6t5r4ewser567t5rer5678987y6trerfty676tredrt565rewsaswe565redfrty7uy6tredftyui8uytrdeftgyuytrdszxdfgtyhgtfdxsfrt


Title: Fails for Sep 12.
Name: Stiv Ostenberg
Date: 9/13/2017 10:01:23 PM
Comment:
Accepts "Sept" but not "Sep"


Title: mmm dd, yyyy
Name: hi
Date: 11/1/2008 2:02:34 AM
Comment:
the above regular expression is unable to find the mmm dd, yyyy format can u give me the regular expression for mmm dd, yyyy


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