9 Sep
2009
9 Sep
'09
1:29 p.m.
IOStream's regex_filter loads the whole file in memory befory applying the regex on it.
No, it doesn't. As I said before, when you compile my code and use it against very large file in which all matching lines lay near the end then the output file will be empty. It can't load whole file because streams use buffers.
If your pattern always matches on a single line, you could use getline().
I can't I want to use iostreams regex_filter because it apply regex on large data chunks and i hope it will be much faster then applying it line by line. Otherwise i would not use iostreams at all.
Alternatively, take a look at the Boost.Regex "partial match"
I will take a look. -- Regards Michał Nowotka