Extracting Date from String with Regular Expressions for Python

Can anyone tell me why the following isn't working:

I am reading lines from a file, some lines have a date at the beginning and some lines do not. I wanted to use regex to detect if a line I am reading in from the file has a date at the beginning, if it does then I want to do some further parsing. If it does not, I just want to ignore it. The following is a sample line:

" JAN 01 19 BALANCE FORWARD: 32 CHQ PLAN 33 222.13 "

When I use the re.findall, it appears my regular expression is incorrect as I am hoping to extract the date "JAN 01 19" but instead all I get returned is "JAN":

line = " JAN 01 19 BALANCE FORWARD: 32 CHQ PLAN 33                        222.13        "
print(re.findall(r"(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC) \d{2} \d{2}", line))



What I am hoping to see is:

['JAN 01 19']

From what I understand of regex, the (JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC) part should be checking for one of these months in the string, I then have a space and then I am looking for a 2 digit number with \d{2}, then another space and then another 2 digit number with \d{2}.

I tried testing this out on https://regex101.com/ and I seem to get a match of 'JAN 01 19' so I am really unsure why the regular expression is not working when I move this to Python.

regex101.com Output

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum