Boost logo

Boost Users :

From: Kyle Alons (kalons_at_[hidden])
Date: 2007-01-14 09:16:33


> Kyle: the trick with these is to change the expression to make it as
> unambiguous as possible: the exception is thrown when the regex state
> machine visits too many states while trying to find a match and then gives
> it up as a lost cause rather than risking looking indefinitely.
>
> In this case the first (.*|\\n*) is superfluous since . can match \n as
> well, so the machine can "thrash" if it encounters a lot of whitespace.
> Using (?!System)* fixed the problem and brought the execution time down
> enormously.
>

Spot on. I didn't think it could be that simple. Thanks!

Kyle


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net