problems with re

Martin von Loewis loewis at
Thu May 31 13:41:41 EDT 2001

"Marc Risney" <marc.risney at> writes:

>       tempstring ='<h3>Search
> Results</h3>(.*?)</table>',entry,re.DOTALL)
> RuntimeError: maximum recursion limit exceeded
> any ideas??

There is a recursion limit in sre. As the first thing, I'd try to use
.* instead of .*?. If that doesn't help, you can either use pre
instead of sre, or you can try ommitting the group, and splitting the
matching part with [22:-8] or some such.


More information about the Python-list mailing list