Regularization of removing HTML tags and spaces by ASP

Time:2021-9-24

function nohtml(str) 
dim re 
Set re=new RegExp 
       re.IgnoreCase =true 
       re.Global=True 
       re.Pattern=”(\<.[^\<]*\>)” 
       str=re.replace(str,” “) 
       re.Pattern=”(\<\/[^\<]*\>)” 
       str=re.replace(str,” “) 
       str=replace(str,”&nbsp;”,””)
       str=replace(str,” “,””)
       nohtml=str 
       set re=nothing 
end function