[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError
report at bugs.python.org
Fri Oct 14 18:28:25 CEST 2011
Matthew Barnett <python at mrabarnett.plus.com> added the comment:
The limit is an implementation detail. The pattern is compiled into codes which are then interpreted, and it just happens that the codes are (usually) 16 bits, giving a range of 0..65535, but it uses 65535 to represent no limit and doesn't warn if you actually write 65535.
There's an alternative regex implementation here:
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list