[Tutor] re module fails to handle text > 16142 characters ???
pan@uchicago.edu
pan@uchicago.edu
Tue May 20 01:44:01 2003
The other day I was using re to do some parsing and
found that one of the text that I tried to parse returned
an error :
return reObj.findall(doc)[0]
RuntimeError: maximum recursion limit exceeded
After some painful debugging, I found:
let S = len(doc)
1. When S > 16143: re.find function failed;
2. When S = 16143: failed too
3. When S = 16142: successful. This was tested by deleting ANY
character in that 16143-long doc.
I am using Python 2.2.1. Is this a known-bug???
I would really like to post the entire code here but it's very
long, so I think it's better to ask first to see if it's a known
bug.
pan