If you know the meaning of Strip word you will know what does it do. just kidding
The StripHTML function removes all HTML code from a string.
Syntax:
string = StripHTML(string)
Example Usage:
<%
dim a
a = a & “<HTML>” & vbCrLf
a = a & “<HEAD>” & vbCrLf
a = a & “<TITLE>Rana’s Blog</TITLE>” & vbCrLf
a = a & “</HEAD>” & vbCrLf
a = a & “<BODY>” & vbCrLf
a = a & “-Code Project!!!” & vbCrLf
a = a & “<A href=”" mce_href=”"./Rana.asp”"></A>” & vbCrLf
a = a & “</BODY>” & vbCrLf
a = a & “</HTML>” & vbCrLf
response.write StripHTML(a)
%>
Output
Rana’s Blog – Code Project
One of my reader asked me how to do in ASP.NET
In ASP.NET you can strip the HTML using Regex
Dim StrStripped As String
StrStripped = System.Text.RegularExpressions.Regex.Replace(“Input as String”, “Pattern like (.|\n)*?”, String.Empty)






I found this code from somewhere you can get customize according to your wish. thanks anyway.
Function StripHTMLTag(ByVal sText)
StripHTMLTag = “”
fFound = False
Do While InStr(sText, “<”)
fFound = True
StripHTMLTag = StripHTMLTag & ” ” & Left(sText, InStr(sText, “”) + 1)
Loop
StripHTMLTag = StripHTMLTag & sText
If Not fFound Then StripHTMLTag = sText
End Function
By: John on January 25, 2008
at 7:04 am
If we add this instead of (.|\n)*? then it will work.
For example:
Dim StrStripped As String
StrStripped = “ABC”
StrStripped = System.Text.RegularExpressions.Regex.Replace(StrStripped, “”, String.Empty)
Response.Write(StrStripped)
By: Naveed Mazhar on January 25, 2008
at 7:18 am