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


End Function

'================================================
'作  用:检查组件是否已经安装
'返回值:True  ----已经安装
'        False ----没有安装
'================================================
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&"([\s\S]*?)"&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

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/3519.html