<p>my <b>SSRS DataSet</b> returns a field with HTML, e.g.</p>

<pre><code>&lt;b&gt;blah blah &lt;/b&gt;&lt;i&gt; blah &lt;/i&gt;.
</code></pre>

<p>how do i strip all the HTML tags? has to be done with <b>inline</b> VB.NET</p>

<p>Changing the data in the table is not an option.</p>

<p><strong>Solution found</strong> ... = System.Text.RegularExpressions.Regex.Replace(StringWithHTMLtoStrip, "&lt;[^>]+>","")</p>

[{'answer_id': 34935, 'author': 'Daniel Jennings', 'author_id': 3641, 'author_profile': 'https://Stackoverflow.com/users/3641', 'pm_score': 2, 'selected': False, 'text': '<p>Here\'s a good example using Regular Expressions: <a href="https://web.archive.org/web/20210619174622/https://www.4guysfromrolla.com/webtech/042501-1.shtml" rel="nofollow noreferrer">https://web.archive.org/web/20210619174622/https://www.4guysfromrolla.com/webtech/042501-1.shtml</a></p>\n'}, {'answer_id': 34942, 'author': 'Jason Bunting', 'author_id': 1790, 'author_profile': 'https://Stackoverflow.com/users/1790', 'pm_score': 1, 'selected': False, 'text': '<p>If you know the HTML is well-formed enough, you could, if you make sure it has a root node, convert the data in that field into a System.Xml.XmlDocument and then get the InnerText value from it.</p>\n\n<p>Again, you will have to make sure the text has a root node, which you can add yourself if needs be, since it will not matter, and make sure the HTML is well formed.</p>\n'}, {'answer_id': 35012, 'author': 'roman m', 'author_id': 3661, 'author_profile': 'https://Stackoverflow.com/users/3661', 'pm_score': 5, 'selected': True, 'text': '<p>Thanx to Daniel, but I needed it to be done inline ... here\'s the solution:</p>\n\n<p><code>= System.Text.RegularExpressions.Regex.Replace(StringWithHTMLtoStrip, "&lt;[^&gt;]+&gt;","")</code></p>\n\n<p>Here are the links:</p>\n\n<p><a href="http://weblogs.asp.net/rosherove/archive/2003/05/13/6963.aspx" rel="noreferrer">http://weblogs.asp.net/rosherove/archive/2003/05/13/6963.aspx</a><br>\n<a href="http://msdn.microsoft.com/en-us/library/ms157328.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/ms157328.aspx</a></p>\n'}, {'answer_id': 36543, 'author': 'Andrei Rînea', 'author_id': 1796, 'author_profile': 'https://Stackoverflow.com/users/1796', 'pm_score': 1, 'selected': False, 'text': '<p>If you don\'t want to use regular expressions (for example if you need better performance) you could try <a href="http://www.codeproject.com/KB/MCMS/htmlTagStripper.aspx" rel="nofollow noreferrer">a small method I wrote a while ago, posted at CodeProject</a>.</p>\n'}, {'answer_id': 23781709, 'author': 'Peter', 'author_id': 58553, 'author_profile': 'https://Stackoverflow.com/users/58553', 'pm_score': 1, 'selected': False, 'text': '<p>I would go to Report Properties and then code and add the following</p>\n\n<pre><code>Dim mRemoveTagRegex AS NEW System.Text.RegularExpressions.Regex("&lt;(.|\\n)+?&gt;", System.Text.RegularExpressions.RegexOptions.Compiled)\n\nFunction RemoveHtml(ByVal text As string) AS string\n  If text IsNot Nothing Then\n    Return mRemoveTagRegex.Replace(text, "")\n  End If \nEnd Function\n</code></pre>\n\n<p>Then you can use <code>Code.RemoveHtml(Fields!Content.Value)</code> to remove the html tags.</p>\n\n<p>In my opinion this is preferable then having multiple copies of the regex.</p>\n'}]
['https://Stackoverflow.com/questions/34926', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3661/']