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,
Júlio.

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:
> http://boost.2283326.n4.nabble.com/Complex-serach-and-replace-in-C-string-tp4450535p4450584.html
> Sent from the Boost - Users mailing list archive at Nabble.com.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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