problems with re

Martin von Loewis loewis at informatik.hu-berlin.de
Thu May 31 19:41:41 CEST 2001


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

>       tempstring = re.search(r'<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.

Regards,
Martin



More information about the Python-list mailing list