Boost logo

Boost Users :

From: Adam Molnar (ed_at_[hidden])
Date: 2004-07-26 06:23:59


> starts and ends with repeats either of which can match repeated
whitespace -
> this is what causes the matcher to thrash trying to find a match,
eventually
> leading to it giving up and throwing an exception, I think you could make
> your expression much more precise by using:
>
> regex re("([^\n]*\\n+)+\\s+NEEDEDSUBITEM2:[^\\s]");
>
> By moving the \s+ out side of the repeat like this the expression is now
> much more deterministic - it can only do one thing for any given input
> character.

indeed refactoring the expression solved the problem, thanks!

adam


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