From: "CJ M." Date: 2012-03-26T11:43:51+09:00 Subject: string.scan failure when match works Good Evening All, I'm very new to coding of any kind, and I'm trying to learn Ruby by working through some projects that are relevant to me. I'm working on a small project to pull the headlines out of a news website for me. I'm able to get match working just fine. I've tried switching to string.scan to be able to iterate and nothing is returned. I can't figure out why not, and would appreciate suggestions. I realize the code is very ugly, and I apologize! Thank you in advance, CJ page_string='junk' open("http://www.scatoday.net/") {|f| page_string = f.read } #THIS one works, one time #rezstring = /\/node\/[0-9]+.*title=".*">/.match(page_string) #THESE Don't #page_string.scan(/\/node\/[0-9]+.*title=".*">/) #page_string.gsub(/\/node\/[0-9]+.*title=".*">/) -- Posted via http://www.ruby-forum.com/.