From: Eric Armstrong Date: 2006-07-30T04:55:22+09:00 Subject: Re: Finding "\" in a string William James wrote: > Eric Armstrong wrote: >> Paul Battley wrote: >>> On 29/07/06, William James wrote: >>>>>> puts "\\foo\\bar".gsub(/\\/, '\&\&' ) >>>> \\foo\\bar >>> Nice solution. >>> >> I'll say! Wild! What makes /that/ work??? > > \& is simply what was matched by the regex. > Too cool. I love it. Thanks. Another instructive thread. What a great list. :_)