Patrick Gundlach <clr1.10.randomuser / spamgourmet.com> wrote: > Andreas Schwarz <usenet / andreas-s.net> writes: > > > puts "hello".gsub!(/h/,"\\\\'") > > > > "\\" is reserved for backreferences. > > Hello Andreas, > > Oh, yes. This works fine. Thank you (and of course Simon). > Another way to obtain same result.. without extra escaping. puts "hello".gsub!(/h/) {|m| "\\'"} -- Simon Strandgaard