我有日志文件Logfile.log:
sometext...
2014/11/05 11:06:11.001 3652 3176 G1 CInterProcessNetwork::SetDyngateIDforSession() id=821130255 session=1 ptype=2
...sometext
我需要得到这个ID" 821130255"。我需要使用哪种模式用于VBScript.RegExp?
我正在使用此代码:
With WScript.CreateObject("VBScript.RegExp")
.Pattern = "????"
If .Test(strContent) Then
strValue = .Execute(strContent).Item(0).Submatches.Item(0)
WScript.Echo "Found value [" & strValue & "]."
Else
WScript.Echo "Can't find pattern [" & .Pattern & "] in content of [" & strSourceFile & "]."
End If
End With