网页数据中有一值为
<TD class=ttButton onclick="interface_t(null, 116906022, 3, 'L', this)" align=middle>null, 116906022, 3, 'L', this的值我可以得到 但是如果得到116906022这个数字呢?For Each ttt In WebBrowser1.document.document.All
aaa=ttt.click
然后aaa="null, 116906022, 3, 'L', this"但这样得到116906022这个值太麻烦了 我想更直接一点得到 有办法吗?谢了
<TD class=ttButton onclick="interface_t(null, 116906022, 3, 'L', this)" align=middle>null, 116906022, 3, 'L', this的值我可以得到 但是如果得到116906022这个数字呢?For Each ttt In WebBrowser1.document.document.All
aaa=ttt.click
然后aaa="null, 116906022, 3, 'L', this"但这样得到116906022这个值太麻烦了 我想更直接一点得到 有办法吗?谢了
aaa = "interface_t(null, 116906022, 3, 'L', this)"
bbb = Mid(aaa, InStr(aaa, ",") + 1, InStr(InStr(aaa, ",") + 1, aaa, ",") - InStr(aaa, ",") - 1)
MsgBox bbbEnd Sub
Dim reg As Object, matchs As Object
Set reg = CreateObject("vbscript.regexp")
reg.Pattern = "onclick.*?(\d+)"
Set matchs = reg.Execute("<TD class=ttButton onclick=""interface_t(null, 116906022, 3, 'L', this)"" align=middle>")
MsgBox matchs(0).SubMatches(0)
End Sub