programming-examples/asp/Data_Access_DateTime/StripHTML.asp

23 lines
393 B
Plaintext
Raw Permalink Normal View History

2019-11-18 14:25:58 +01:00
<%
' stripHTML vers 1 - VBScript
function stripHTML(txt)
set Reg = new RegExp
Reg.pattern = "[<][^>]*[>]"
Reg.IgnoreCase = true
Reg.Global = true
stripHTML = Reg.Replace(txt,"")
end function
%>
<%
// stripHTML vers 1 - Jscript
function stripHTML(string) {
var strip = new RegExp();
strip = /[<][^>]*[>]/gi;
return string.replace(strip, "");
}
%>