62,046
社区成员
发帖
与我相关
我的任务
分享
string s = "fds<font style=\"color:#FFFF37\">st</font>asbc";
string[] results = Regex.Split(s, @"(?is)(<!?/?[^>]*/?>)");
results = results.Select(x => x.StartsWith("<") && x.EndsWith(">") ? x : x = x.Replace("s", "ABC")).ToArray();
string r = string.Concat(results);
Response.Write(Server.HtmlEncode(r));