Boost logo

Boost Users :

From: Chris Uzdavinis (cuzdav_at_[hidden])
Date: 2007-02-15 20:14:47


On 2/15/07, Derrick Schommer <schommer_at_[hidden]> wrote:
> I'll give that a try, thanks. Just cannot see why is it that .{1,3}
> doesn't have the same effect given the only difference is the
> exclusion of a 'b'.

I'm getting the impression that you have a wrong impression of regular
expressions. When you say .[^b] the [^b] is not modifying the .
expression. What you have are two regular expressions next to each
other, first the dot (for one character), then [^b], which matches
anything except b. So .[^b] matches 2 characters, "any-character
followed by any-character-except-b". Now when you put the
repeatitions on it, ".[^b]{1,3}" you have "any-character followed by
one-to -three-characters-that-aren't-b"

Hope that helps.
Chris


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