From: John Sampson Date: 2013-01-16T21:58:13+09:00 Subject: Escaped backslashes in input strings - newbie question I am trying to find a way of removing escaped characters in input strings from a file made by another program. That is to say, two-character sequences in which the first character is a backslash. I would have thought in my naivete that gsub(/\\./,"") would do this, but no. I am using Ruby 1.9 hence Oniguruma. Firstly, are the strings input from a text file treated as single- or double-quoted? Secondly, are there alternatives to gsub? Thirdly, are there any *clear* and *exhaustive* treatments of the question of escaped backslashes in Ruby - in input strings in programs, in IRB, with single-quoted strings, double-quoted strings and other situations? I guess a multidimensional table might be useful to determine how to escape a backslash, if it can be done at all. Regards John Sampson