I'm writing a Java console program which looks up the vendor for a given mac address.
Using 'arp -a' through runtime i receive a string such as:
"172.17.7.144 44-94-fc-68-b7-03 dynamic"
I'm having difficulty splitting the string to just retrieve the mac address, the spacing between the IP address and the mac changes depending on length, so splitting via spaces doesn't appear to work.
What is the best way to retrieve the data from a string like this?