Why doesn't my regular expression work?
Typically, it’s an issue between re.match and re.search. Match matches the beginning only and search checks the entire string. See the regular expression HOWTO for more details:
Also, Python comes with a handy program for testing regular expressions, in Tools/scripts/redemo.py.
CATEGORY: tutor
