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"

Nobu Nakada