more than 100 capturing groups in a regex

Frithiof Andreas Jensen frithiof.jensen at
Tue Oct 25 10:59:07 CEST 2005

"Joerg Schuster" <joerg.schuster at> wrote in message
news:1130160675.270886.208420 at

Python regular expressions must not have more than 100 capturing

Really ??

I have been waiting a long time now for Python to get rid of this

Ahh - The "dark side" of Open Source:

If nobody cares, then you will have to do it yourself (and often people do
not care because nobody had the need to go there - for good reasons).

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?

After a quick glean across the source code for the sre module, it appears
that the only place the code mentions a limit of 100 groups is in fact the
place that you quote.

I suspect it is there for some historic reason -  the people to ask is of
course "" who wrote it; there may well be a good reason for
the limitation.

What happens if you up the limit to whatever you need?

More information about the Python-list mailing list