From: Peter Loftus Date: 2007-12-14T01:28:58+09:00 Subject: Re: pulling out a specfic feild from a line ok but lets say im looping through an array full of different lengths and layouts of strings for instance example example example exmaple/dfsd/asdf/ asdfasdf example 1 example2 example 3 laskdjflkasdjfkl im looking to see if the that third string on line 3 is actually there so passing very line into array and then checking each line arr = Array.new i = 0 File.foreach(example.txt) do |line| arr[i] = line i += 1 end arr.each do |item| if (arr.to_s.split("\t")[2] = "example 3") puts "found it" end -- Posted via http://www.ruby-forum.com/.