/// 除去所有在HTML元素中标记
public static string StripHTML(string strHtml)
{
string strOutput=strHtml;
Regex regex = new Regex(@"<[^>]+>|</[^>]+>");
strOutput = regex.Replace(strOutput,"");
return strOutput;
}
时间: 2024-09-28 18:58:25
/// 除去所有在HTML元素中标记
public static string StripHTML(string strHtml)
{
string strOutput=strHtml;
Regex regex = new Regex(@"<[^>]+>|</[^>]+>");
strOutput = regex.Replace(strOutput,"");
return strOutput;
}