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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Months
Expression
^(?:J(anuary|u(ne|ly))|February|Ma(rch|y)|A(pril|ugust)|(((Sept|Nov|Dec)em)|Octo)ber)$
Description
This RE validate the full name of the months.
Matches
January | May | October
Non-Matches
Jan | Septem | Octo
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: louboutin049
Name: louboutin049
Date: 10/5/2012 2:28:48 AM
Comment:
This is all very new to me and this article really opened my eyes.Thanks for sharing with us your wisdom. http://www.discountchristianlouboutinnews.com/Christian-Louboutin-BIBI-140MM(Amethyste)-p155.html http://www.discountchristianlouboutinnews.com/Christian-Louboutin-ALTI-PUMP-140MM(Taupe)-p149.html


Title: RE: Probably Unnecessary
Name: Michael Ash
Date: 5/9/2009 11:46:14 PM
Comment:
Aside from the captures, which could be made non capture groups,the above pattern would probably process as fast or faster than the alternataion suggested because the pattern can fail quicker for most months. Jan-May would process in the same time. But the other months would be matched after fewer test. June for instance would require 5 failed test before matching with simple alternation. The posted pattern would match the "J" failed once on the a in anuary then match June.


Title: Probably Unnecessary
Name: JB
Date: 4/14/2009 1:21:34 PM
Comment:
If you just type them out it is only one extra character and probably saves on processing time: ^January|February|March|April|May|June|July|August|September|October|November|December$


Title: nice work
Name: finnigan
Date: 3/26/2006 6:02:47 PM
Comment:
Juness is definately not a moonth...


Title: Expression: J(anuary|u(ne|ly))|February|Ma(rch|y)|A(pril|ugust)|(((Sept|
Name: Manjunath
Date: 7/8/2004 7:33:38 AM
Comment:
Expression: J(anuary|u(ne|ly))|February|Ma(rch|y)|A(pril|ugust)|(((Sept| Nov|Dec)em)|Octo)ber this will not work if you entere Juness


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