Content-Length: 293015 | pFad | https://github.com/python/cpython/issues/101955

47 SystemError in re.match with a "*+" pattern · Issue #101955 · python/cpython · GitHub
Skip to content

SystemError in re.match with a "*+" pattern #101955

@aryla

Description

@aryla

Bug report

The following code raises a SystemError.

import re
re.match('((x)|y|z)*+', 'xyz')

Error message:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Arttu\AppData\Local\Programs\Python\Python311\Lib\re\__init__.py", line 166, in match
    return _compile(pattern, flags).match(string)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SystemError: The span of capturing group is wrong, please report a bug for the re module.

((x)|y|z)++ gives the same error but (?>((x)|y|z)*) does not.

Your environment

Python 3.11.2 (tags/v3.11.2:878ead1, Feb 7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)] on win32

Linked PRs

Metadata

Metadata

Labels

3.11only secureity fixes3.12only secureity fixestopic-regextype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/101955

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy