Thanks for the help.
My platform is Win32 and I was able to create a
class:
class mystring: public
std::iterator<std::bidirectional_iterator_tag, char >
mystring class opens the input file and maps
it into memory using:
CreateFileMapping
MapViewOfFile
and I pass this into regex_replace. It seems to work - any thoughts?
Thanks again
Louis
> -----Original Message-----
> From:
boost-users-bounces@lists.boost.org> [mailto:boost-users-bounces@lists.boost.org] On Behalf Of John
Maddock
> Sent: Tuesday, August 23, 2005 11:08 AM
> To: boost-users@lists.boost.org>
Subject: Re: [Boost-users] regex_replace with file streams
>
>>I
want to use regex_replace to operate on a potentially large input
>>file and 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 (ie create the proper
iterator).
>
> Take a look at the second example in
>
http://www.boost.org/libs/regex/doc/partial_matches.html>
> 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 mailing
list
> Boost-users@lists.boost.org> http://lists.boost.org/mailman/listinfo.cgi/boost-users>