content = Regex.Replace(content, @"div\s*[^>]*", @"[$&]", RegexOptions.IgnoreCase);
//替换正则取的原字符
private string Replace(Match m)
{
return m.Value.Replace('<','{').Replace('>','}');
}
//原字符用<>用{}替换
MatchEvaluator myEvaluator = new MatchEvaluator(Replace);
content = Regex.Replace(content, @"<p\s*[^>]*>", myEvaluator, RegexOptions.IgnoreCase);