Boost logo

Boost Users :

Subject: Re: [Boost-users] Complex serach and replace in C++ string
From: Júlio Hoffimann (julio.hoffimann_at_[hidden])
Date: 2012-03-06 12:24:53

Hi Claude,

Remember if you have access to a recent C++ compiler, you can use regular
expressions! If not, you can still use the Boost alternatives: Boost.Regex
or Boost.Xpressive.

I'm assuming that you know beforehand the number of "quoted sub-strings",
because otherwise, regular expressions are not so useful, and people often
recommend Boost.Spirit, which is too complex for this simple task.

About the trim operation you want to do in the outside parts, remember
Boost.StringAlgo has it for you. ;-)

Good luck,

2012/3/6 Claude <clros_at_[hidden]>

> In detail: If I have a string:
> Hello World! I am out! '*here I am in*' out there '*and here still inside!
> *'Hello!
> Should I trim it outside the quote symbol:
> HelloWorld!Iamout!'*Here I am in*'outthere'*and here still inside! *'Hello!
> --
> View this message in context:
> Sent from the Boost - Users mailing list archive at
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at