more than 100 capturing groups in a regex
Joerg Schuster
joerg.schuster at gmail.com
Mon Oct 24 09:31:15 EDT 2005
Hello,
Python regular expressions must not have more than 100 capturing
groups. The source code responsible for this reads as follows:
# XXX: <fl> get rid of this limitation!
if p.pattern.groups > 100:
raise AssertionError(
"sorry, but this version only supports 100 named groups"
)
I have been waiting a long time now for Python to get rid of this
limitation.
I could make a program of mine a lot faster with an easy hack if Python
did not have it.
My question is: Does anyone know if the problem is going to be fixed in
the next few months or so? Or is there a way to circumvent it?
Jörg Schuster
More information about the Python-list
mailing list