Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2007-03-16 06:14:23


llwaeva_at_[hidden] wrote:
> But, as I mentioned above, the whole matached string, namely #P{x},
> will be replaced once the match is found. So, the character [^#] will
> also be replaced, that is not what I want.

Try a negative lookbehind: "(?<!#)#" will match any single "#" that is
*not* preceded by another #. The previous character (whatever it is) does
not form part of the 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