Im trying to parse a recv from a telnet session then only grab certain data.
Heres an example of the recv that Im storing into a string:
Internet 204.189.124.205 0 001a.a01f.4e5a ARPA Vlan122
The only part I want is the mac address which is in bold.
Im trying to parse it while running it into a for loop so when it gets to the 4th section it will store that in another string. But its not working, anybody have any ideas?
Heres an example of the recv that Im storing into a string:
Internet 204.189.124.205 0 001a.a01f.4e5a ARPA Vlan122
The only part I want is the mac address which is in bold.
Im trying to parse it while running it into a for loop so when it gets to the 4th section it will store that in another string. But its not working, anybody have any ideas?
Code:
public static string ParseMac(string macOut) { for (int i = 0; i < 10; i++) { if (i == 4) { char[] delimiterChars = { ' ' }; string[] outPut = macOut.Split(delimiterChars); foreach (string s in outPut) { } } } return (s); }
Comment