using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
var s = "abcd";
var result = Regex.Replace(s, @"[abc]", @"\$&");
Console.WriteLine(result);
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CnB1YmxpYyBjbGFzcyBUZXN0CnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKCXsKCQkgdmFyIHMgPSAiYWJjZCI7CgkgICAgIHZhciByZXN1bHQgPSBSZWdleC5SZXBsYWNlKHMsIEAiW2FiY10iLCBAIlwkJiIpOwoJCSBDb25zb2xlLldyaXRlTGluZShyZXN1bHQpOwoJfQp9