Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
([Jj]an(uary)?|[Ff]eb(ruary)?|[Mm]ar(ch)?|[Aa]pr(il)?|[Mm]ay|[Jj]un(e)?|[Jj]ul(y)?|[Aa]ug(ust)?|[Ss]ep(t(ember)?)?|[Oo]ct(ober)?|[Nn]ov(ember)?|[Dd]ec(ember)?)((0[1-9])|([12][0-9])|(3[01])|[1-9]){1}
"
g

Description

Three letter or full text month name (including Sept for September) with or without upper case first letter for month followed by one or two digit day with no intervening white space.

examples: Jan10 february29 Sept15 september30

Invalid dates can get by: eg February30, Jun31

Submitted by anonymous - 6 years ago