Boost logo

Boost Users :

Subject: Re: [Boost-users] Regex & Multiple Iterations in single string?
From: John Maddock (john_at_[hidden])
Date: 2009-01-28 04:50:06


> 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.


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