newasp中main类

2019-01-14 07:48:24王振洲

        str = Replace(str, """, Chr(34))
        str = Replace(str, vbNewLine, "")
        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
            If t >= strLen Then
                strTemp = Left(str, i) & "..."
                Exit For
            Else
                strTemp = str & " "
            End If
        Next
        GotTopic = CheckTopic(strTemp)
    End Function
    Public Function CheckTopic(ByVal strContent)
        Dim re
        On Error Resume Next
        Set re = New RegExp
        re.IgnoreCase = True
        re.Global = True
        re.Pattern = "(<s+cript(.+?)</s+cript>)"
        strContent = re.Replace(strContent, "")
        re.Pattern = "(<iframe(.+?)</iframe>)"
        strContent = re.Replace(strContent, "")
        re.Pattern = "(>)"
        strContent = re.Replace(strContent, ">")