I am looking to match a date string like below:
string1 = '11/13/2019 - 11/13/2019'
string2 = '11/14/2019 11/14/2019'
string3 = '01/21/2019. . 11/20/2019'
I am using the below code to fetch all of them:
match : r"(\d+[/1]\d+[/1]\d+[ - ]\d+[/1]\d+[/1]\d+)"
But the above is giving me only string 1
.
All strings have two dates in common, I wanted to match it with both the date formats, ignoring the characters in between them. Is there a way to do this?
ignore '-'
, ' '
, '. .'