This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients alex, complex, vstinner
Date 2011-03-24.23:06:59
SpamBayes Score 9.600058e-07
Marked as misclassified No
Message-id <1301008020.58.0.165093323239.issue11665@psf.upfronthosting.co.za>
In-reply-to
Content
If I read correctly '(<(?:(?:[^<>]*)|(?:"[^"]*"))*>)', it is something like (A*|B)*. Regex like (A*)* is *very* slow. It can easily be optimized to A*. Or for (A*|B)* => (A|B)*.

So '(<(?:(?:[^<>]*)|(?:"[^"]*"))*>)' can be optimized to '(<(?:(?:[^<>])|(?:"[^"]*"))*>)'.

I hope that it does match the same thing :-)

I wrote a library to optimize regular expression, but you are unliky: it doesn't support (?:...) yet :-)
https://bitbucket.org/haypo/hachoir/wiki/hachoir-regex
History
Date User Action Args
2011-03-24 23:07:00vstinnersetrecipients: + vstinner, complex, alex
2011-03-24 23:07:00vstinnersetmessageid: <1301008020.58.0.165093323239.issue11665@psf.upfronthosting.co.za>
2011-03-24 23:06:59vstinnerlinkissue11665 messages
2011-03-24 23:06:59vstinnercreate