re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?

Devin Jeanpierre jeanpierreda at gmail.com
Mon Feb 13 23:38:03 EST 2012


Hey Pythonistas,

Consider the regular expression "$*". Compilation fails with the
exception, "sre_constants.error: nothing to repeat".

Consider the regular expression "(?=$)*". As far as I know it is
equivalent. It does not fail to compile.

Why the inconsistency? What's going on here?

-- Devin



More information about the Python-list mailing list