Boost logo

Boost Users :

From: John Maddock (john_maddock_at_[hidden])
Date: 2003-05-31 05:25:38


> That's it exactly. And your explanation was a lot more succinct than
> mine, too! Thanks.
> > I could be wrong, but I interpreted the OP's question to mean: is it
> > possible to have the regex generate an error if more than one
> > sub-field of a
> > specific type is found, i.e. the following would be invalid:
> >
> > ~C123~C345

OK, negative forward lookahead asserts can be used for that:

"~C\\d+(?!.*~C\\d)"

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