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
There is a problem in the regex module. The regular expression with the backreference to a non-greedy group fails (matches nothing) on some inputs unexpectedly.
For example:
importrer1=re.compile('(a+)+\\1')
print(r1.search('a'*28))
# OK, matches the whole stringr2=re.compile('(a+)+?\\1')
print(r2.search('a'*28))
# runs very slowly and eventually returns None
This problem seems to exist even in Python 2.7, which has been fixed in a version of Python 3.11. Since version 3.9 is still under maintenance, would this problem be fixed in the following release? (or is the pull request about this problem accepted?)
Thank You!
CPython versions tested on:
3.9
Operating systems tested on:
Linux, Windows
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
Hello,
There is a problem in the regex module. The regular expression with the backreference to a non-greedy group fails (matches nothing) on some inputs unexpectedly.
For example:
This problem seems to exist even in Python 2.7, which has been fixed in a version of Python 3.11. Since version 3.9 is still under maintenance, would this problem be fixed in the following release? (or is the pull request about this problem accepted?)
Thank You!
CPython versions tested on:
3.9
Operating systems tested on:
Linux, Windows
The text was updated successfully, but these errors were encountered: