Use of regex_grep in regex_replace

I need to know if regex_replace actually makes any replacements, so will have to code something similar myself, rather than using it as is. The 1.31.0 documentation states that regex_replace (effectively) constructs a regex_iterator object to do the work, but in practice it uses the deprecated regex_grep algorithm. Is there some advantage to doing it that way? Thanks, Keith MacDonald

I need to know if regex_replace actually makes any replacements, so will have to code something similar myself, rather than using it as is. The 1.31.0 documentation states that regex_replace (effectively) constructs a regex_iterator object to do the work, but in practice it uses the deprecated regex_grep algorithm. Is there some advantage to doing it that way?
Yes, I haven't got around to rewriting it yet :-) Seriously use the iterator, it should be a lot easier. John.
participants (2)
-
John Maddock
-
Keith MacDonald