Boost logo

Boost Users :

Subject: Re: [Boost-users] [Q] regular expressions change the 'substitue with' value
From: V S P (toreason_at_[hidden])
Date: 2009-06-26 19:24:30


Thank you,
replace_all forks for me now.

But probably will need to go back to regular expression in the future.

I do not think I need to search, I just need to replace (in-place)
I assume the find_XXX functions do not do that.

I might have misunderstood but if I have a string

"
something!1!else!1!ornot
"

and I want to replace !1! with

a new replacement text "c:\temp\file.xls",

isn't the replace_all_regex the correct function to use?
if not, can you suggest an example with the combination of functions
you have mentioned

--------
thank you

>
> With replace_all_regex, the string is not substituted literally.
> Can't you use replace_all instead of replace_all_regex?
> If you really need the search to use a regex, you can use find_format_all
> with regex_finder and const_formatter.
>
> In Christ,
> Steven Watanabe
>

-- 
Vlad P
author of C++  ORM  http://github.com/vladp/CppOrm/tree/master
-- 
http://www.fastmail.fm - mmm... Fastmail...

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