[issue22437] re module: number of named groups is limited to 100 max

Serhiy Storchaka report at bugs.python.org
Mon Sep 29 22:15:38 CEST 2014


Serhiy Storchaka added the comment:

Thank you Antoine for your review.

To avoid discrepancy between re and regex (and other engines), I have committed only a part of dynamic patch, without adding support of backreferences with index over 99. It is unlikely to achieve this limit in hand written regular expression, and in generated regular expression you can use named groups.

I found that backreference syntax is one of most discrepant thing in regular expressions. There are at least 8 different variants (\N, \gN, \g<N>, \g{N}, \k<N>, \k'N', \k{N}, (?P=N)), and \g<N> in Perl have different meaning.

----------
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22437>
_______________________________________


More information about the Python-bugs-list mailing list