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

sub-tle difference between pre and sre #35187

Closed
effbot mannequin opened this issue Sep 17, 2001 · 3 comments
Closed

sub-tle difference between pre and sre #35187

effbot mannequin opened this issue Sep 17, 2001 · 3 comments

Comments

@effbot
Copy link
Mannequin

effbot mannequin commented Sep 17, 2001

BPO 462270
Nosy @serhiy-storchaka

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 = None
closed_at = <Date 2017-12-02.21:48:39.447>
created_at = <Date 2001-09-17.16:27:45.000>
labels = ['expert-regex']
title = 'sub-tle difference between pre and sre'
updated_at = <Date 2017-12-02.21:48:39.447>
user = 'https://bugs.python.org/effbot'

bugs.python.org fields:

activity = <Date 2017-12-02.21:48:39.447>
actor = 'serhiy.storchaka'
assignee = 'effbot'
closed = True
closed_date = None
closer = None
components = ['Regular Expressions']
creation = <Date 2001-09-17.16:27:45.000>
creator = 'effbot'
dependencies = []
files = []
hgrepos = []
issue_num = 462270
keywords = []
message_count = 3.0
messages = ['6557', '6558', '307466']
nosy_count = 2.0
nosy_names = ['effbot', 'serhiy.storchaka']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue462270'
versions = []

@effbot
Copy link
Mannequin Author

effbot mannequin commented Sep 17, 2001

as reported by Carlos Gaston Alvarez on
comp.lang.python (verified in 2.1.1 and 2.2a3):

>>> import pre
>>> p = pre.compile("x*")
>>> p.sub("-", "abxd")
'-a-b-d-'

>>> import sre
>>> p = sre.compile("x*")
>>> p.sub("-", "abxd")
'-a-b--d-'

</F>

@effbot effbot mannequin closed this as completed Sep 17, 2001
@effbot effbot mannequin self-assigned this Sep 17, 2001
@effbot effbot mannequin added the topic-regex label Sep 17, 2001
@effbot effbot mannequin closed this as completed Sep 17, 2001
@effbot effbot mannequin self-assigned this Sep 17, 2001
@effbot effbot mannequin added the topic-regex label Sep 17, 2001
@effbot
Copy link
Mannequin Author

effbot mannequin commented Sep 18, 2001

Logged In: YES
user_id=38376

unlike PRE, SRE didn't ignore empty matches at
the last position. you can never have too many
test cases...

@serhiy-storchaka
Copy link
Member

For history, this was fixed by 21009b9.

@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
Projects
None yet
Development

No branches or pull requests

1 participant