This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author foolip
Date 2003-05-04.09:56:57
SpamBayes Score
Marked as misclassified

Yesterday I spent several hours trying to figure out
why a (stupid) regex like "^|foo" didn't return ['',
'foo'] for findall("foo").

Like this:

0 1 2 3

I figured the ^ would match 0-0 and then a 0-3 match
for foo. I've learnt since that the reason this can't
happen is because the regexp engine would get caught in
an infinte loop. However, the two matches aren't really
overlapping, and the docs state that all
non-overlapping matches would be returned.

I suggest therefor that it is clarified in the docs
that non-overlapping doesn't apply to a zero-length
match at the beginning of another potential match.

This would apply to findall and finditer in
Date User Action Args
2007-08-23 14:13:07adminlinkissue732120 messages
2007-08-23 14:13:07admincreate