Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2005-08-23 11:08:04

>I want to use regex_replace to operate on a potentially large input file
>output the results to another file. So, I can't load the entire file into a
>buffer in memory and pass it in as is done in the examples. I can't seem to
>figure out how to pass fstream or some other file I/O into regex_replace
>create the proper iterator).

Take a look at the second example in

Unfortunately if you want to do a search and replace in an "infinite" text,
then you're not going to be able to use regex_replace. Instead you'll have
to enumerate through the matches and copy unmatched sections to output, and
then call match_results::format on matched sections to get the text to
output for that section.

HTH, John.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at