From: Lou Zell Date: 2008-01-24T11:43:41+09:00 Subject: weird gsub behavior Hi, I came across a problem in a gsub and boiled it down to this difference, can anyone explain? >> b="trying to match whole string" => "trying to match whole string" >> b.gsub(/(.+)/,'MATCH:\1') => "MATCH:trying to match whole string" That operated the way I expected, but: >> b.gsub(/(.*)/,'MATCH:\1') => "MATCH:trying to match whole stringMATCH:" What is with that second match? Thanks, Lou -- Posted via http://www.ruby-forum.com/.