-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
Open
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dirtopic-regex
Description
Documentation
https://docs.python.org/3.14/library/re.html#re.Match.group
if it [groupN arg] is in the inclusive range [1..99], it is the string matching the corresponding parenthesized group.
Unlike \1..\99 notation, .group() is not constrained by 99.
It was constrained up to Python 3.4 (AssertionError: sorry, but this version only supports 100 named groups)
but not since 3.5 (9baa5b2, https://bugs.python.org/issue22437):
>>> re.search('()'*999 + '(y)', 'xy').group(99, 999, 1000)
('', '', 'y')
>>> _sre.MAXGROUPS
1073741823
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dirtopic-regex
Projects
Status
Todo