Hi Ken, what I suggest you do is look at the source for regex_replace: it's
actually a pretty simple application of of regex_iterator internally, it
should be fairly trivial to modify that to do what you want it to,

HTH, John.


Hi John,

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.

For example .NET regex's implement this.
See http://msdn.microsoft.com/en-us/library/ht1sxswy.aspx

Neil Hunt

P.S. Thanks for the great library, and getting it into the C++ spec.