Replace single backslash with double backslash

It seems simple enough, right? Well, I don't know.

Here's the code I'm trying:

input = Regex.Replace(input, "\\", "\\\\\\");

However, I'm receiving an error,

ArgumentException was unhandled - parsing "\" - Illegal \ at end of pattern.

How do I do this?

19
задан Peter Mortensen 14 July 2015 в 21:38
поделиться