You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/rhettinger'closed_at=<Date2003-08-31.05:31:35.000>created_at=<Date2003-05-04.09:56:57.000>labels= ['type-feature', 'docs']
title='An extended definition of "non-overlapping" would save time.'updated_at=<Date2003-08-31.05:31:35.000>user='https://bugs.python.org/foolip'
Yesterday I spent several hours trying to figure out
why a (stupid) regex like "^|foo" didn't return ['',
'foo'] for findall("foo").
Like this:
|f|o|o|
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
doc/python2.2/html/lib/node99.html.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: