Hi Laurent, > Here is my try on it. Besides the ugly copying operations, it seems to > me that the multiline option doesn't make what I was waiting for: > finding a pattern across a newline. I'm afraid this is not a solution as mmap-substring (as well as mmap->string) creates a copy of the mmap-ed area. Your solution is then equivalent to: (call-with-input-file MY-FILE (lambda (in) (pregexp-match (read-string in))))
The copy is a consequence of the memory representation of strings. It cannot be avoided. The only solution would be to change pregexp to accommodate mmap, which should be a good idea and not that difficult to implement but which is not already here yet. Cheers, -- Manuel
