Re: Searching for Regular Expressions in a file

2013-08-13 Thread Christian Sperandio
Is the number of lines known and is it fixed? If it is then you can load the file inside a window, don't you? Le 13 août 2013 20:32, "JvJ" a écrit : > I had some difficulty with the line seq because I was looking for > multi-line patterns. I'll try the char-seq thing. > > On Monday, 12 August 20

Re: Searching for Regular Expressions in a file

2013-08-13 Thread JvJ
I had some difficulty with the line seq because I was looking for multi-line patterns. I'll try the char-seq thing. On Monday, 12 August 2013 18:42:18 UTC-7, Joel Holdbrooks wrote: > > You could use *line-seq* which, if I'm not mistaken, is lazy. Then do > your regex search line by line lazily.

Re: Searching for Regular Expressions in a file

2013-08-12 Thread Joel Holdbrooks
You could use *line-seq* which, if I'm not mistaken, is lazy. Then do your regex search line by line lazily. On Monday, August 12, 2013 4:25:15 PM UTC-7, JvJ wrote: > > Is there a way to do a regex search over an entire file without loading > the file into memory? > -- -- You received this me

Re: Searching for Regular Expressions in a file

2013-08-12 Thread Mark
Clojure's regex functions are built on top of Java's and Java's regex support is built on the CharSequence abstraction, not String as we normally think of them. You could adapt files to CharSequence without much trouble. I think this approach would keep the memory requirements to a minimum.