R
Roger Pack
I see that it is possible currently to parse through a file without
reading the whole thing into RAM, a la
a = File.open('a', 'r')
a.lines{|line|
if line =~ /some regex/
...
end
}
But what if I can to do something like
a = File.read('a').scan /some regex/
is that possible?
Thanks.
-r
reading the whole thing into RAM, a la
a = File.open('a', 'r')
a.lines{|line|
if line =~ /some regex/
...
end
}
But what if I can to do something like
a = File.read('a').scan /some regex/
is that possible?
Thanks.
-r