From: nobu.nokada@... Date: 2001-11-16T13:26:55+09:00 Subject: [ruby-talk:25381] Re: Bug in String.sub and friends? At Fri, 16 Nov 2001 08:55:54 +0900, Matt Armstrong wrote: > irb(main):005:0> s.gsub(/(s)/, '\\\1') > "the\\1tring" irb(main):006:0> '\\\1' "\\\\1" This means an escaped backslash followed by 1. > All are correct except for the last -- I expect the last one to be > "the\\string". irb(main):007:0> s.gsub(/(s)/, '\\\\\1') "the\\string" Nobu Nakada