Jump to content
Sign in to follow this  
phew

StringRegExp()

Recommended Posts

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?

Share this post


Link to post
Share on other sites

Hallo,

it does match. Look at $test[1],$test[2] and $test[3].

$id = $test[1] & $test[2] & $test[3].

ciao

Xandl

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...