more than 100 capturing groups in a regex
D H
no at spam
Wed Oct 26 22:22:21 EDT 2005
Fredrik Lundh wrote:
> Joerg Schuster wrote:
>
>
>>>if you want to know why 100 is a reasonable and non-random choice, I
>>>suggest checking the RE documentation for "99 groups" and the special
>>>meaning of group 0.
>>
>>I have read everything I found about Python regular expressions. But I
>>am not able to understand what you mean. What is so special about 99?
>
>
> it's the largest number than can be written with two decimal digits.
It's a conflict between python's syntax for regex back references and
octal number literals. Probably wasn't noticed until way too late, and
now it will never change.
More information about the Python-list
mailing list