This is an old copy of the Python FAQ. The information here may be outdated.

Why doesn't my regular expression work?

Typically, it’s an issue between re.match and Match matches the beginning only and search checks the entire string. See the regular expression HOWTO for more details: (dead link)

Also, Python comes with a handy program for testing regular expressions, in Tools/scripts/



A Django site. rendered by a django application. hosted by webfaction.