I wanted to make a regex that would parse date expressions that appear periodically in a document I'm looking at, in particular, the date will sometimes be written as:
FEBRUARY 8
FEBRUARY. 8
FEBRUARY 8.
FEBRUARY 8
So my regex should look like
re.compile(MonthList+'.?.?.?.?[0-9][0-9]?')
Except that this doesn't work. How can I write a list into my regular expression such that it acts as (JANUARY|FEBRUARY|MARCH|...etc) instead of actually writing that out, or making a loop?