.net html字符串原格式化

来源:互联网 发布:强生隐形眼镜 知乎 编辑:程序博客网 时间:2024/06/05 06:33
用正则清掉html标签就行了,给你个函数,using System.Text.RegularExpressions;public static string StripHT(string strHtml){            Regex regex=new Regex("<.+?>",RegexOptions.IgnoreCase);            string strOutput=regex.Replace(strHtml,"");            return strOutput; }
0 0
原创粉丝点击