Function FilterHTML(str)
    Dim re,cutStr
    Set re=new RegExp
    re.IgnoreCase =True
    re.Global=True
    re.Pattern="<(.[^>]*)>"
    str=re.Replace(str,"")   
    set re=Nothing

    str=Replace(str,"&nbsp","")
    str=Replace(str,chr(10),"")
    str=Replace(str,chr(13),"")
    str=Replace(str," ","")
    str=Replace(str," ","")

    Dim l,t,c,i
    l=Len(str)
    t=0
    For i=1 to l
        c=Abs(Asc(Mid(str,i,1)))
        If c>255 Then
            t=t+2
        Else
            t=t+1
        End If
        cutStr=str
    Next
   
    FilterHTML= cutStr
End Function
posted on 2010-07-26 23:35  bestsaler  阅读(136)  评论(0编辑  收藏  举报