remove tags from html string function

by rezashirazi 11/15/2008 1:46:00 PM

You can create a function for removing html tags from html string. here it is:

    Protected Function removeHTML(ByVal html As String) As String
        If String.IsNullOrEmpty(html) Then
            Return ""
        Else
            Return System.Text.RegularExpressions.Regex.Replace(html, "<[^>]*>", String.Empty)
        End If
    End Function

 Happy Programming Smile

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag





Live preview

7/4/2009 3:19:52 AM

About the author

Name of author Reza Shirazi Mofrad
Interests: Image processing, computer vision, Artificial intelligence, Microsoft .NET technologies, Web programming.

E-mail me Send mail

Calendar

<<  July 2009  >>
MoTuWeThFrSaSu
293012345
6789101112
13141516171819
20212223242526
272829303112
3456789

View posts in large calendar

Site statistics

Tags

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009

Sign in