Ok, this is the first time Ive used Split with a Regex and Im having trouble.
Below is an example of a string from a CS server log...
L 11/01/2003 - 21:25:07: "[sYn]Lastpak<183><STEAM_0:0:976431><TERRORIST>" killed "[sYn]Speedball O.D.<172><STEAM_0:0:316497><CT>" with "glock18"
I want to split that string by <STEAM_x:x:xxxxxx> at the same time keeping <STEAM_x:x:xxxxxx> as part of the resulting array.
Atm I have the following code...
But for some reason Im getting this...
Parts(0) = L 11/01/2003 - 21:25:07: "[sYn]Lastpak<183>
Parts(1) = <STEAM_0:0:976431><TERRORIST>" killed "[sYn]Speedball O.D.<172><STEAM_0:0:316497><CT>
Parts(2) = " with "glock18"
When what I want to get is this...
Parts(0) = L 11/01/2003 - 21:25:07: "[sYn]Lastpak<183>
Parts(1) = <STEAM_0:0:976431>
Parts(2) = <TERRORIST>" killed "[sYn]Speedball O.D.<172>
Parts(3) = <STEAM_0:0:316497>
Parts(4) = <CT>" with "glock18"
Cheers,
Andy!
Below is an example of a string from a CS server log...
L 11/01/2003 - 21:25:07: "[sYn]Lastpak<183><STEAM_0:0:976431><TERRORIST>" killed "[sYn]Speedball O.D.<172><STEAM_0:0:316497><CT>" with "glock18"
I want to split that string by <STEAM_x:x:xxxxxx> at the same time keeping <STEAM_x:x:xxxxxx> as part of the resulting array.
Atm I have the following code...
Code:
Dim reUID As New System.Text.RegularExpressions.Regex("(<STEAM_.+:.+:.+>)")
Dim Parts = reUID.Split(CurrentLine)
But for some reason Im getting this...
Parts(0) = L 11/01/2003 - 21:25:07: "[sYn]Lastpak<183>
Parts(1) = <STEAM_0:0:976431><TERRORIST>" killed "[sYn]Speedball O.D.<172><STEAM_0:0:316497><CT>
Parts(2) = " with "glock18"
When what I want to get is this...
Parts(0) = L 11/01/2003 - 21:25:07: "[sYn]Lastpak<183>
Parts(1) = <STEAM_0:0:976431>
Parts(2) = <TERRORIST>" killed "[sYn]Speedball O.D.<172>
Parts(3) = <STEAM_0:0:316497>
Parts(4) = <CT>" with "glock18"
Cheers,
Andy!