Boost logo

Boost Users :

Subject: Re: [Boost-users] [regex] Context-sensitive replacement oftextusingregex_replace
From: Eric MALENFANT (Eric.Malenfant_at_[hidden])
Date: 2009-02-25 08:58:11


>> Having done something similar a number of times, I wonder if it would
>> be worth implementing a variant of regex_replace where a functor is
>> called that accepts the matched string and returns the replacement
>> string.
>>
>> I think this is a common usage scenario.
>
> Me too: I was thinking exactly this as I wrote that reply,
> I'll try and add this for the next release - can I get you to
> file a feature request at svn.boost.org so I don't forget?

find_format_all, in the String_Algo library, with a regex_finder and a
custom formatter, can be used for that, IIUC.


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