From: Lee Jarvis Date: 2007-11-23T20:00:56+09:00 Subject: Re: Checking File for a line 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/.