nobu.nokada / softhome.net writes: > At Fri, 16 Nov 2001 08:55:54 +0900, > Matt Armstrong <matt+dated+1008460550.550a83 / lickey.com> 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" Thanks. My confusion was because '\1' == '\\1'. -- matt Piki, you handsome cat, rest in peace http://www.lickey.com/piki/