From: Harry Ohlsen Date: 2001-12-08T23:37:04+09:00 Subject: [ruby-talk:27933] Replacing single backslashes by a pair I'm trying to write some code to convert Ruby source into LaTeX for an article I'm working on. One of the things I need to do is convert any backslashes to pairs of backslashes, but I got an error when I tried to do this ... line.gsub!("\\", "\\\\") telling me a regular expression can't end with a backslash. I assume there must be some other way to do it. Any suggestions?