phew Posted December 15, 2007 Share Posted December 15, 2007 hello! my string $SID[$i] is: CsComm ConnectionPool Dec-15-2007 19:05:08.014 [81944] Did not find an existing connection, attempting new connection 0,213.202.254.131:27030 for 0:0:322754 my regexp: Dim $SID _FileReadToArray("Steam.log", $SID) For $i = 1 to $SID[0] $test = StringRegExp($SID[$i], "(.*?)(\d):(\d):(\d*)", 3) If (@error = 0) Then MsgBox(0, "", $test[0]) EndIf Next i want to match 0:0:322754! well what i want to do is searching in my file "Steam.log" for the steamID which is written in format \d:\d:\d*, and save this ID in a variable.. any suggestions? Link to comment Share on other sites More sharing options...
Xandl Posted December 15, 2007 Share Posted December 15, 2007 Hallo, it does match. Look at $test[1],$test[2] and $test[3]. $id = $test[1] & $test[2] & $test[3]. ciao Xandl Link to comment Share on other sites More sharing options...
Valuater Posted December 15, 2007 Share Posted December 15, 2007 (edited) Maybe... $test = 0:0:322754 Dim $SID _FileReadToArray("Steam.log", $SID) For $i = 1 to $SID[0] If StringInStr($SID[$i], $test) Then MsgBox(0, "", $test) ; ExitLoop EndIf Next 8) Edited December 15, 2007 by Valuater Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now