|
Boost Users : |
Subject: Re: [Boost-users] [regex] Context-sensitive replacement of text usingregex_replace
From: Neil Hunt (boost_at_[hidden])
Date: 2009-02-25 07:36:29
>
> 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.
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