Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strip HTML from string in SSRS 2005 (VB.NET)

my SSRS DataSet returns a field with HTML, e.g.

<b>blah blah </b><i> blah </i>.

how do i strip all the HTML tags? has to be done with inline VB.NET

Changing the data in the table is not an option.

Solution found ... = System.Text.RegularExpressions.Regex.Replace(StringWithHTMLtoStrip, "<[^>]+>","")

like image 266
roman m Avatar asked Aug 29 '08 18:08

roman m


1 Answers

Thanx to Daniel, but I needed it to be done inline ... here's the solution:

= System.Text.RegularExpressions.Regex.Replace(StringWithHTMLtoStrip, "<[^>]+>","")

Here are the links:

http://weblogs.asp.net/rosherove/archive/2003/05/13/6963.aspx
http://msdn.microsoft.com/en-us/library/ms157328.aspx

like image 165
roman m Avatar answered Oct 05 '22 22:10

roman m