This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

regexp help

Old posts that have not been replied to for several years.
Locked
a
anti-social
Voice
Posts: 4
Joined: Sun Oct 19, 2003 2:35 am
Location: Fountain Valley, CA
Contact:

regexp help

Post by anti-social »

need some help with this. when they upgraded cs they changed the way the logs would come out.
originaly it was like this:
"CircA<281><12345><TERRORIST>"
but then when they updated it changed to:
"CircA<281><STEAM_0:0:12345><TERRORIST>"
or
"CircA<281><STEAM_0:1:12345><TERRORIST>"
depending on the persons steamid
the orignal code was like this:

Code: Select all

regexp {(.+)<([0-9]+)><[0-9]+><([A-Z]*)>} $name all nk sid team
where $all would come out "CircA<281><2374><TERRORIST>" $nk the name "CircA" and $sid would be "281" and $team "TERRORIST".
but the STEAM_0:0: or STEAM_0:1: seems to be messing it up and returning 0.
a
anti-social
Voice
Posts: 4
Joined: Sun Oct 19, 2003 2:35 am
Location: Fountain Valley, CA
Contact:

Post by anti-social »

okay after i posted i tryed some more then i finally got it working. not sure if its the right way but i changed it to:

Code: Select all

regexp {(.+)<([0-9]+)><STEAM_0:[0-1]:[0-9]+><([A-Z]*)>} $nk1 all nk sid team
Locked