Regexp optimization question

"Martin v. Löwis" martin at v.loewis.de
Thu Apr 22 16:44:17 EDT 2004


Magnus Lie Hetland wrote:
> I've tried to speed this up by using the same trick as SPARK, putting
> all the regexps into a single or-group in a new regexp. That helped a
> *lot* -- but now I have to find out which one of them matched at a
> certain location.

Are you using the .lastindex attribute of match objects yet?

Martin




More information about the Python-list mailing list