string html = "<div><p>1、测试</p><p>2、测试</p><p>3、测试</p><div>";//需要去除的值 string strText = System.Text.RegularExpressions.Regex.Replace(html, "<[^>]+>", ""); strText = System.Text.RegularExpressions.Regex.Replace(strText, "&[^;]+;", "");
转载于:https://www.cnblogs.com/ZouMingqi/p/6141228.html
相关资源:JAVA上百实例源码以及开源项目