re module - Maximum recursion limit exceeded.

Vicente Rey Bakaikoa rey at tucana.harvard.edu
Tue May 29 15:16:26 EDT 2001


I have been searching all around for this problem of:

>>> re.search('a.*?b','a'+'c'*9997)
>>> re.search('a.*?b','a'+'c'*9998)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/home/rey/python/lib/python2.1/sre.py", line 57, in search
    return _compile(pattern, flags).search(string)
RuntimeError: maximum recursion limit exceeded

I am running Python 2.1 ( released ). This is and 'old' bug
for which F.Lundh was already proposing a path with 2.02b. I would
have expected the patch to be included with python 2.1.

Am I missing something?

thank you,



More information about the Python-list mailing list