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

Devin Jeanpierre jeanpierreda at
Wed Feb 15 08:43:37 EST 2012

On Tue, Feb 14, 2012 at 9:08 PM, MRAB <python at> wrote:
> There is one place in the re engine where it tries to avoid getting
> stuck in an infinite loop because of a zero-width match, but the fix
> inadvertently causes another bug. It's described in issue #1647489.

Just read the issue. Interesting, didn't know that was a bug rather
than deliberate behavior. The other behavior (only match empty space
once) makes more sense though. Thanks for linking.

Still, that's for avoiding infinite loops in finditer/findall, not
match/search :S

-- Devin

More information about the Python-list mailing list