C#技术百科
问问你的心你有没有信心 做事情要专一坚定,执着
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  王德田  阅读(219)  评论(0编辑  收藏  举报