Peter Loftus wrote:
> Im pretty sure this will work but is there any cleaner way to do it?

File.readlines('file.txt.).each do |line|
    puts 'got it!' if line =~ /regexp/
end

Hope the helps.

Regards,
Lee
-- 
Posted via http://www.ruby-forum.com/.