Regex File contents

  • Thread starter Thread starter Frank Ashley
  • Start date Start date
F

Frank Ashley

I want to regex a 600Mb file. Instead of reading it all into a string and
passing that into an expression is it possible to point regex to a file for
proccesing?


Thanks
Frank
 
True. But I was hoping there was some kind file/memory trickery that regex
might use.


regards
Frank
 
Frank said:
I want to regex a 600Mb file. Instead of reading it all into a string and
passing that into an expression is it possible to point regex to a file for
proccesing?

Not directly. But - assuming that the file contains multiple matches -
you can read it in a chunk at a time until you have a match; process
all matches in the read buffer; then read again until the next match.
Not the most trivial code, but nothing that will cause hair loss.
 
Back
Top