I want to parse month and year from given string.
I have list of strings like below:
a = ['WORK EXPERIENCE: ',
'Cause + Effect Strategy & Marketing (CESM) | Rochester, New York ',
'',
' May 17-Aug 17 ',
'',
' Jun 14-Jun 15 ',]
Now I want to first parse date like "May 17-Aug 17" and "Jun 14-Jun 15" from list.
I tried to use for loops on each element of list and used datefinder and parser, so I can get date string, but I got empty list.
I tried to use regex for find date like below:
re.findall(r'((?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]*(?:-|\.|\s|,)\s?\d{,2}[a-z]*(?:-|,|\s)?\s?\d{2,4})',string)
I got from above regex.