I have a string of time for example:
text = '2010; 04/20/2010; 04/2009'
I want to only find the first standalone '2010', but applying the following code:
re.findall(r'\d{4}', text)
will also find the second '2010' embedded in the mm/dd/yyyy format.
Is there a way to achieve this (not using the ';' sign)?