Regex & Multiple Iterations in single string?

Hi I am building something that does multiple random search and replaces across a single text file read line by line. This is just underway and already a snag. I need to know if there is a lightweight to identify and as important handle multiple regex matches in a single string.
From what I am aware BOOST_REGEX_MATCH_EXTRA exists but adds overhead and is maybe overkill.
Anyone know how I can run a regex of "e" on "ececece" and deal with the 4 occurences on an individual basis. Much thanks to you all keep up the hard work, John

I am building something that does multiple random search and replaces across a single text file read line by line.
This is just underway and already a snag.
I need to know if there is a lightweight to identify and as important handle multiple regex matches in a single string.
From what I am aware BOOST_REGEX_MATCH_EXTRA exists but adds overhead and is maybe overkill.
Anyone know how I can run a regex of "e" on "ececece" and deal with the 4 occurences on an individual basis.
Try regex_iterator, or if you prefer then regex_replace will replace all occurances with the string you specify. John.
participants (3)
-
Andrew Holden
-
John D
-
John Maddock