当前位置:首页 > Windows程序 > 正文

c#后台替换html标签的方法

2021-03-25 Windows程序

 public static string ReplaceHtmlTag(string html)

        {

             string strText = System.Text.RegularExpressions.Regex.Replace(html, "<span>", "");

             strText = System.Text.RegularExpressions.Regex.Replace(strText, "</span>", "");

             strText = System.Text.RegularExpressions.Regex.Replace(strText,"</br>","");

            return strText;

        }

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/67176.html