I'm trying to parse dates with regex, using groups, but python is returning empty lists. I'm not doing anything fancy, just 12/25/10 sort of stuff. I want it to reject 12/25-10 though.
date = re.compile("\d{1,2}([/.-])\d{1,2}\1\d{2}")
I've tried online regex libraries, but their solutions don't seem to run either. Any ideas?
Sample input: "Hello today is 10/18/10, and the time is 10:50am" Hopeful output: "10/18/10"
I'm running Python 2.5.