Message132051
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 |
|
Date |
User |
Action |
Args |
2011-03-24 23:07:00 | vstinner | set | recipients:
+ vstinner, complex, alex |
2011-03-24 23:07:00 | vstinner | set | messageid: <1301008020.58.0.165093323239.issue11665@psf.upfronthosting.co.za> |
2011-03-24 23:06:59 | vstinner | link | issue11665 messages |
2011-03-24 23:06:59 | vstinner | create | |
|