I know that I can use RegEx to replace all occurrences of 'a', 'b' or 'c' with a blackslash character in a line like this:
string result = Regex.Replace(input, "[abc]", "\\");
But how can I replace each occurrence with a backslash followed by a character that matches?
source
share