From: Peter Bailey Date: 2007-09-18T21:41:32+09:00 Subject: finding string matches, in order, in a file Hi, I've got files I want to parse. I'm using a string scan routine that populates an array. I need to pull the entries of that array out, in order, eventually. I'm getting an array all right, but, I don't understand its order. The first instance in the string, meaning the whole file, is way down the list in the array. The first entry in the array is an entry that's 300 lines deep into the file. Why isn't the first instance in the string, the file, the first entry in the array? xmlfile.scan(/\n(.*)<\/issue>\n?/) do |match| codes = $1 puts codes Thanks, Peter -- Posted via http://www.ruby-forum.com/.