本帖最后由 bcrun 于 2012-04-21 10:16:23 编辑

解决方案 »

  1.   

    Option ExplicitPrivate Sub Command1_Click()
        Dim tem$
        tem = "<input onclick=""javascript:call('12342')"">测试1</input><input onclick=""javascript:call('1345')"">测试2</input><input onclick=""javascript:call('2345')"">测试3</input><input onclick=""javascript:call('1235')"">测试4</input><input onclick=""javascript:call('13345')"">测试5</input><input onclick=""javascript:call('12145')"">测试6</input><input onclick=""javascript:call('12335')"">测试4</input><input onclick=""javascript:call('12341')"">测试8</input><input onclick=""javascript:call('12745')"">测试9</input><input onclick=""javascript:call('12545')"">测试11</input>"
        Call GetNum(tem)
    End SubPrivate Sub GetNum(ByVal Source$)
        On Error Resume Next
        Dim RegExp As Object, Matches As Object
        Dim i&
        Set RegExp = CreateObject("VBscript.RegExp")
        RegExp.Global = True
        RegExp.Pattern = "'(\d+)'"
        Set Matches = RegExp.Execute(Source)
        For i = 0 To Matches.Count - 1
            Debug.Print Matches(i).SubMatches(0)
        Next i
        Set RegExp = Nothing
        Set Matches = Nothing
    End Sub
      

  2.   

    第2个:
    RegExp.Pattern = "'\)"">(.*?)<"
    改成这样就好了。