B
Bill Kelly
Hi,
I'm probably being dense, but -
=> "ab\\cd"
I expected the above to produce "ab\\\\cd"
If i add a character in between the \\\\, then
I do get two backslashes in the result:
=> "ab\\a\\cd"
If I add a third backslash in the replacement string,
then I get two in the result:
=> "ab\\\\cd"
Is this the expected behavior? If so, what's the
principle I need to know to understand it?
(ruby 1.8.2 (2004-07-29) [i386-mswin32] and
ruby 1.8.2 (2004-11-06) [i686-linux])
Thanks,
Regards,
Bill
I'm probably being dense, but -
=> "ab\\cd"
I expected the above to produce "ab\\\\cd"
If i add a character in between the \\\\, then
I do get two backslashes in the result:
=> "ab\\a\\cd"
If I add a third backslash in the replacement string,
then I get two in the result:
=> "ab\\\\cd"
Is this the expected behavior? If so, what's the
principle I need to know to understand it?
(ruby 1.8.2 (2004-07-29) [i386-mswin32] and
ruby 1.8.2 (2004-11-06) [i686-linux])
Thanks,
Regards,
Bill