From: Allan Date: 2010-03-03T12:25:07+09:00 Subject: Re: Find and replace with values from array with gsub Thanks for your help. I'm still seeing a small problem: My original input is: "I am a big fan of Derek Jeter and Jorge Posada of the Yankees" Output is: I am a big fan of Derek Jeter and Jorge Posada of the Yankees I am a big fan of Jorge Posada and Jorge Posada of the Yankees How do I fix that last loop to provide me with the correct return? Thanks in advance. You've been a lot of help! -A On Mar 2, 6:54 pm, Raul Jara wrote: > Gah!  The last little bit should be: > > names_links.each_pair do |name, link| >    @full_text.gsub!(name, link) > end > > results is an array, not a hash, so it wouldn't make much sense to run > each pair on it. > > Sorry about that.  I really wish there were a way to edit posts. > -- > Posted viahttp://www.ruby-forum.com/.