|
Boost Users : |
From: Edward Diener (eddielee_at_[hidden])
Date: 2002-08-05 15:12:24
<dan.ellis_at_[hidden]> wrote in message
news:OF27A3756F.13B25931-ON80256C0C.0058371E_at_uk.sophos...
>
> On 08/03/2002 05:04:26 PM news wrote:
>
> > > I need a match on "a AND is" when searching a sentence like "This is a
> > > test".
>
> >Regular expressions match sequences of characters. Your match says to
> match
> >a string when both of 2 different matching possibilities exist anywhere
in
> >the string. To do this you must use 2 separate regular expression matches
> >separating them by the normal C++ "&&" operator.
>
> Maybe I'm misunderstanding what's wanted, but wouldn't
>
> is.*a
>
> do what he wants? Or if they need to be matched in either order:
>
> (is.*a)|(a.*is)
Yes, that should do it. It was my mistake to suggest that two matches would
have to be used.
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