写了段批量抓取某个列表页的东东

2019-04-02 23:40:53于海丽

'================================================
Function IsObjInstalled(objName)
    On Error Resume Next
    IsObjInstalled = False
    Err = 0
    Dim testObj
    SET testObj = Server.CreateObject(objName)
    IF(0 = Err)THEN IsObjInstalled = True
    SET testObj = NOTHING
    Err = 0
End Function

Function RegExpText(strng,strStart,strEnd,n)
    Dim regEx,Match,Matches,RetStr
    SET regEx = New RegExp
    regEx.Pattern = strStart&"([sS]*?)"&strEnd
    regEx.IgnoreCase = True
    regEx.Global = True
    SET Matches = regEx.Execute(strng)
    For Each Match in Matches
        IF(n=1)THEN
            RetStr = RetStr & regEx.Replace(Match.Value,"$1") & ","
        ELSE
            RetStr = RetStr & regEx.Replace(Match.Value,"$1")
        END IF
    Next
    RegExpText = RetStr
    SET regEx=NOTHING
End Function