ASP过滤特定HTML标签函数

Function  ScriptHtml(Byval ConStr,TagName,FType)
    
Dim  Re
    
Set  Re = new  RegExp
    Re.IgnoreCase 
= False
    Re.Global
= True
    
Select   Case  FType
    
Case   1
       Re.Pattern
= " < "   &  TagName  &   " ([^>])*> "
       ConStr
= Re.Replace(ConStr, "" )
    
Case   2
       Re.Pattern
= " < "   &  TagName  &   " ([^>])*>.*? "   &  TagName  &   " ([^>])*> "
       ConStr
= Re.Replace(ConStr, "" )
    
Case   3
       Re.Pattern
= " < "   &  TagName  &   " ([^>])*> "
       ConStr
= Re.Replace(ConStr, "" )
       Re.Pattern
= " "   &  TagName  &   " ([^>])*> "
       ConStr
= Re.Replace(ConStr, "" )
    
End   Select
    ScriptHtml
= ConStr
    
Set  Re = Nothing
End Function  
 

你可能感兴趣的:(ASP,asp,html,function)