Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::regex on to match in the middle of a string
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2010-03-11 19:02:54


On Thu, Mar 11, 2010 at 10:54 AM, Conoscenza Silente
<abruzzoforteegentile_at_[hidden]> wrote:
> Hi All
> I am newbie to boost::regex.
> I have a string including multiple new lines characters in it like the one
> below.
>
> "this is a big string\nthat I would like\ntoParse here:
> WORD_TO_FIND=Ciao\nin the middle"
>
> I tried the following regex but it doesn't match.
>
> boost::regex ln0("WORD_TO_FIND=\t(?<SYMBOL>\\w+).+", boost::regex::perl );
>
> Do you know what is the option and how to set it up
> to enable the matching for an entire string and not line by line?

Do not quote me, I am not that knowledgeable about regex, but give
this a try, add a g\ to the beginning of your parsing line, or \g or
\g\ or something like that, I think it means global...


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