StripHTML Function:

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>bill's place</TITLE>" & vbCrLf
a = a & "</HEAD>" & vbCrLf
a = a & "<BODY>" & vbCrLf
a = a & "some body text here baby!!!" & vbCrLf
a = a & "<A HREF=""./johnson.asp"">some link</A>" & vbCrLf
a = a & "</BODY>" & vbCrLf
a = a & "</HTML>" & vbCrLf

response.write StripHTML(a)

 ' returns:
 ' "bill's placesome body text here baby!!!some link"
%>
ASP Source Code:
<%
Private Function StripHTML(byVal string)
	Dim lngStart, lngEnd, strHTML
	string = Replace( string, vbTab, "" )
	string = Replace( string, vbCrLf, "" )
	string = Trim( string )
	do
		lngStart = Instr(string, "<")
		lngEnd   = InStr(string, ">")
		strHTML  = Mid( string, lngStart, _
			   lngEnd - lngStart + 1)
		string   = Trim(  Replace( string, strHTML, "" )  )
	loop until Not Instr(string, "<") _
		AND Not Instr(string, ">")
	If Instr( string, "<" ) Then _
		string = StripHTML( Trim( string ) )
	StripHTML = Trim( string )
End Function
%>