Boost logo

Boost Users :

From: dan.ellis_at_[hidden]
Date: 2002-08-05 11:08:21


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)

It doesn't scale well, of course.

--
Dan Ellis, Software Engineer, Sophos Anti-Virus
Email: dan.ellis_at_[hidden], DDI: 01235 540204
Real Business/CBI Growing Business Awards: Company of the Year
Tel: 01235 559933, Web: http://www.sophos.com/

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