I'm trying to extract dates out of a string using python. The date is in the format mm-dd-yyyy. So I know the regex should be something like /d{2}-/d{2}-/d{4}. However when I try and iterate over the array below I am not able to extract the dates out of the string.
import re
logs = ["First entry to journal logs. (01-01-2015)", "Last entry to journal logs 07-01-2016"]
for i in logs:
m = re.match("/d{2}-/d{2}-/d{4}",i)
print m.group(0)
I haven't work with re before so not sure if I'm using it properly.