Over a million developers have joined DZone.

Remove HTML Tags From A String

·
// removes html tags from a string


function strip_html(str_html)
	dim objRegExp, str_output
	set objRegExp = new Regexp

	if not isNull(str_html) then
	
	objRegExp.IgnoreCase = True
	objRegExp.Global = True
	objRegExp.Pattern = "<(.|\n)+?>"

	str_output = objRegExp.Replace(str_html,"")
	str_output = Replace(str_output,"<","<")
	str_output = Replace(str_output,">",">")
	str_output = Replace(str_output,"""","'")
	strip_html = str_output
	
	end if
	
	set objRegExp = Nothing
end function
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}