Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2007-01-27 05:12:08


Kyle Alons wrote:
>>> 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.
>>>
>>
>> That works for the previous input file but not the attached one
>> (which does work with the older regex lib and original expression).

What do you mean by "doesn't work" ? It runs to completion just fine for
me, no exceptions etc. Or do you mean it produces the wrong output? (I
don't know what your specific intent was for the regex, so I can't guarentee
that it's 100% identical in result).

John.


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