////////////////////////////
string inputstr = "@{AbcD},@{bbbb},@{ABcd}";
string pmType = "@";
string regTxt = (pmType + "//s*//{//s*" + "abcd" + "//s*//}").Replace("(", "//(").Replace(")", "//)");
//string regTxt = (pmType + "//s*//{//s*" + "aaaa" + "//s*//}").Replace("(", "//(").Replace(")", "//)");
// string regTxt = @"@/s*/{/s*aaaa/s*/}";
// string regTxt = @"@/s*/{/s*aaaa/s*/}/gi";
inputstr = Regex.Replace(inputstr, regTxt, "CCC", RegexOptions.IgnoreCase | RegexOptions.Compiled);
///////////////
对于小文本不使用 RegexOptions.Compiled;
新闻热点
疑难解答