正则表达式替换标签

               str = System.Text.RegularExpressions.Regex.Replace(str, " <(?!(/?table)|(/?tr)|(/?td))[^ <>]*?>", "", RegexOptions.IgnoreCase);
                str = System.Text.RegularExpressions.Regex.Replace(str, @" <(\w+)\s*[^ <>]*?>", " <$1>", RegexOptions.IgnoreCase);
                str = System.Text.RegularExpressions.Regex.Replace(str, "&nbsp", "", RegexOptions.IgnoreCase);

                System.Xml.XmlDocument dom = new System.Xml.XmlDocument();
                dom.LoadXml(str);
                System.Xml.XmlNodeList nl = dom.SelectNodes("//tr");
                for (int i = 0; i < nl.Count; i++)
                {
                   
                }
原文地址:https://www.cnblogs.com/wanglinglong/p/1557273.html