[Python-Dev] (no subject)

Fredrik Lundh fredrik at pythonware.com
Thu Nov 24 16:00:04 CET 2005


Donovan Baarda wrote:

> I don't know if this will help, but in my experience compiling re's
> often takes longer than matching them... are you sure that it's the
> match and not a compile that is taking a long time? Are you using
> pre-compiled re's or are you dynamically generating strings and using
> them?

patterns with nested repeats can behave badly on certain types of non-
matching input. (each repeat is basically a loop, and if you nest enough
loops things can quickly get out of hand, even if the inner loop doesn't
do much...)

</F> 





More information about the Python-Dev mailing list