in reply to Possible to have regexes act on file directly (not in memory)

Is your regexp bounded in size, or is something along the line of .* acceptable as a regexp? The answer can change the approach used when considering backtracking.

And just a small nit: you are going to have to read chunks of the file into memory to be able to act on them. At some point in time, the program has to access data from the file.

--MidLifeXis