Paul Lutus wrote:
> puts '\\\\\1'
>
> \\\1 # meaning two backslashes and an escaped '1'
>
> Oh, by the way. You haven't said what you are trying to accomplish.

I was trying to escape some characters in a string with a backslash.

When printing out '\\\\\1' (resulting in two backslashes and and
escaped '1' like you said) I would expect the result string s
(s=numbers.gsub(/(2|4)/, '\\\\\1') to contain *two* backslashes and
then the original character. But apparently the replacement string is
interpreted as "one backslash and a backreference (escaped with two
backslashes)."