Guárdelo como un archivo .asp y ejecutarlo. Es muy emocionante usar esto cuando usa ASPHTTP para capturar contenido. Por supuesto, debes mejorarlo tú mismo.
<%
OpcionExpliCit
Functionstriphtml (strhtml)
'StripsThehtmltagsFromStrhtml
Dimobjregexp, stroutput
Setobjregexp = newregexp
objegexp.ignorecase = True
objregexp.global = verdadero
objregexp.pattern = "<.+?>"
'Reemplazo reemplazo
stroutput = objregexp.replace (strhtml, "")
'Reemplazar <y> con <y>
stroutput = reemplazar (stroutput, "<", "<")
stroutput = reemplazar (stroutput, ">", ">")
striphtml = stroutput'returnTheValueOfStroutput
Setobjregexp = nada
Función final
%>
<formmethod = "post" id = form1Name = form1>
<b> EnterAnhtmlString: </b> <br>
<TextareAname = "TXTHTML" cols = "50" ROWS = "8" wrap = "virtual"> <%= request ("txthtml")%> </textarea>
<p>
<inputType = "Subt" value = "StripHtmltags!" Id = Subbit1Name = Subsit1>
</form>
<%iflen (request ("txthtml"))> 0then%>
<p> <hr> <p>
<b> <u> ViewOfString <i> withno </i> htmlstripping: </u> </b> <br>
<xmp>
<%= Request ("txthtml")%>
</xmp> <p>
<b> <u> ViewOfString <i> con </i> htmlstripping: </u> </b> <br>
<pre>
<%= Striphtml (request ("txthtml"))%>
</pre>
<%Endif%>