Trying to write a RE to recognize date format mm/dd in Python
reg = "((1[0-2])|(0?[1-9]))/((1[0-9])|(2[0-9])|(3[0-1])|(0?[0-9]))"
match = re.findall(reg, text, re.IGNORECASE)
print match
For text = '4/13'
it gives me
[('4', '4', '', '13', '13', '', '', '')]
but not
'4/13'
Thanks, Cheng