Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An extended definition of "non-overlapping" would save time. #38440

Closed
foolip mannequin opened this issue May 4, 2003 · 2 comments
Closed

An extended definition of "non-overlapping" would save time. #38440

foolip mannequin opened this issue May 4, 2003 · 2 comments
Assignees
Labels
docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@foolip
Copy link
Mannequin

foolip mannequin commented May 4, 2003

BPO 732120
Nosy @rhettinger

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 = <Date 2003-08-31.05:31:35.000>
created_at = <Date 2003-05-04.09:56:57.000>
labels = ['type-feature', 'docs']
title = 'An extended definition of "non-overlapping" would save time.'
updated_at = <Date 2003-08-31.05:31:35.000>
user = 'https://bugs.python.org/foolip'

bugs.python.org fields:

activity = <Date 2003-08-31.05:31:35.000>
actor = 'rhettinger'
assignee = 'rhettinger'
closed = True
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2003-05-04.09:56:57.000>
creator = 'foolip'
dependencies = []
files = []
hgrepos = []
issue_num = 732120
keywords = []
message_count = 2.0
messages = ['15861', '15862']
nosy_count = 2.0
nosy_names = ['rhettinger', 'foolip']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue732120'
versions = []

@foolip
Copy link
Mannequin Author

foolip mannequin commented May 4, 2003

Hello.

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.

@foolip foolip mannequin closed this as completed May 4, 2003
@foolip foolip mannequin assigned rhettinger May 4, 2003
@foolip foolip mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels May 4, 2003
@foolip foolip mannequin closed this as completed May 4, 2003
@foolip foolip mannequin assigned rhettinger May 4, 2003
@foolip foolip mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels May 4, 2003
@rhettinger
Copy link
Contributor

Logged In: YES
user_id=80475

Nice catch.

Applied fix to Doc/lib/libre.tex 1.103 and 1.101.8.2

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant