1. 程式人生 > >C# 正則表示式去除標籤

C# 正則表示式去除標籤

model.Summary = HttpUtility.HtmlDecode(model.Summary);
Regex replaceSpace = new Regex(@"</?[p|P][^>]*>", RegexOptions.IgnoreCase);
model.Summary = replaceSpace.Replace(model.Summary,"");