david karapetyan wrote: > look up gsub! for the String class. you can write > > some_string.gsub(/href=\"([^\"]+)\"/) do |match| > ## do stuff with match > end > > i'm pretty sure the above code will work for what you are trying to do. you know, I thought about String#scan, but for some reason didn't think it was what I was looking for, but it works sorta nicely. it doesn't behave exactly how I'd want... but the String#gsub method looks more like what I'm looking for; this way, I can loop and access my various $1, $2, etc matches and not have to work with an array that I have to loop over in a weird way (since I don't use some of matches). I'll have to play with this a little more. thanks! -- Posted via http://www.ruby-forum.com/.