Windows Phone Developers

Showing posts with label Remove HTML Tags from String using .NET Regular Expressions. Show all posts
Showing posts with label Remove HTML Tags from String using .NET Regular Expressions. Show all posts

Sunday, June 1, 2008

Remove HTML Tags from String using .NET Regular Expressions

Strip HTML Tags from String using Regular Expressions

Sub Regex_Replace_Example()

Dim oReg As Regex

Dim sInput As String

Dim sOut As String

' Strip of Simple HTML Tags

sInput = "This is a HTML Text"

oReg = New Regex("")

sOut = oReg.Replace(sInput, "", "")

' Strip of Complex HTML Tags

sInput = "This is a HTML Text with images "

oReg = New Regex("")

sOut = oReg.Replace(sInput, "<[^<>]+>", "")

End Sub

See Also
Extract Ref Links From WebPage using VB.Net Regular Expressions
Remove HTML Tags from String using .NET Regular Expressions
VB.NET Regular Expression to Check URL
VB.NET Regular Expression to Check Email Addresses
VB.NET Regular Expression to Check MAC Address
Regular Expression to Check Zip Code
Validate eMail Addresses using VB.NET Function
Regular Expressions in Dot Net (.NET)

Digg Technorati Delicious StumbleUpon Reddit BlinkList Furl Mixx Facebook Google Bookmark Yahoo
ma.gnolia squidoo newsvine live netscape tailrank mister-wong blogmarks slashdot spurl StumbleUpon