Over a million developers have joined DZone.

Remove HTML Tags From A String

DZone's Guide to

Remove HTML Tags From A String

Free Resource
// 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

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}