From: matt@... (matt neuburg) Date: 2006-10-13T11:05:12+09:00 Subject: Re: Ruby Regexp vs Perl and C# matt neuburg wrote: > Chris Meyers wrote: > > > how do you do multiple matches in Ruby with full match information? > > gsub In fact you could effectively write it exactly as you did it in Perl: "banana".gsub(/(an)*/) { puts $` + "<<" + $& + ">>" + $' } m. -- matt neuburg, phd = matt@tidbits.com, http://www.tidbits.com/matt/ Tiger - http://www.takecontrolbooks.com/tiger-customizing.html AppleScript - http://www.amazon.com/gp/product/0596102119 Read TidBITS! It's free and smart. http://www.tidbits.com