I have this string
Book Release Date: 2 June, 2010 [Edition#5]
Book Release Date: 24 October, 1996
I want to use a regex to find the date only like follow:
2 June, 2010
24 October, 1996
I have tried using this pattern that is close to what I want
# this pattern result
# 2 June, 2010 [Edition#5]
# 24 October, 1996
date = re.findall(r"(?<=(Book Release Date: ))(.*?)(?=(\[|\n))", text)
# this pattern result
# 2 June, 2010
# None
date = re.findall(r"(?<=(Book Release Date: ))(.*?)(?=\[)", text)