Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
(?P<Month>(?:01|02|03|04|05|06|07|08|09|10|11|1|2|1|2|3|4|5|6|7|8|9|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec|January|February|March|April|May|June|July|August|September|October|November|December))[\-/\\\s]+(?P<Day>[0-3]?\d)[\-/\\\s]+(?P<Year>\d+)
"
gi

Description

Parses date in (Month Day Year) format with delimiting chars being -/ or whitespace

Submitted by Awk - 9 years ago