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.

Title: sub-tle difference between pre and sre
Type: Stage:
Components: Regular Expressions Versions:
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: effbot Nosy List: effbot, serhiy.storchaka
Priority: normal Keywords:

Created on 2001-09-17 16:27 by effbot, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Messages (3)
msg6557 - (view) Author: Fredrik Lundh (effbot) * (Python committer) Date: 2001-09-17 16:27
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")

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

msg6558 - (view) Author: Fredrik Lundh (effbot) * (Python committer) Date: 2001-09-18 18:35
Logged In: YES 

unlike PRE, SRE didn't ignore empty matches at
the last position.  you can never have too many
test cases...
msg307466 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-12-02 21:48
For history, this was fixed by 21009b9c6fc40b25fcb30ee60d6108f235733e40.
Date User Action Args
2022-04-10 16:04:27adminsetgithub: 35187
2017-12-02 21:48:39serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg307466
2001-09-17 16:27:45effbotcreate