Quantcast
Channel: htmlagilitypack Forum Rss Feed
Viewing all articles
Browse latest Browse all 655

New Post: HtmlAgilitypack on strings C#

$
0
0
replace
report.Description = Regex.Replace(report.Description, "<.*?>| ", string.Empty);

with the following
Regex r = new Regex(@"<span [^>]*(?:font-weight:\s?bold)[^>]*>(?<boldtext>[^<]*)</span>");
        report.Description = r.Replace(report.Description, "<b>$1</b>");


        Regex p = new Regex("<((?!b)(?!i))[^/>]*>|</((?!b)(?!i))[^>]*>");
        report.Description = p.Replace(report.Description, "");

Viewing all articles
Browse latest Browse all 655


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>