首页 > 代码库 > 出去html中的标签

出去html中的标签

public static string StripHTML(string strHtml)
        {
            string strOutput = strHtml;
            Regex regex = new Regex(@"<[^>]+>|</[^>]+>");
            strOutput = regex.Replace(strOutput, "");
            return strOutput;

        }