Is the output of ipconfig same in all windows machine ??. I want to capture ip-address , default gateway, subnet mask from ipconfig's output.
Currently i am doing this :
String[] arr = s.split("IPv4 Address. . . . . . . . . . . : ");
ipAddress = (arr[1].split("\\n"))[0];
String[] arr1 = s.split("Subnet Mask . . . . . . . . . . . : ");
subnetMask = (arr1[1].split("\\n"))[0];
String[] arr2 = s.split("Default Gateway . . . . . . . . . : ");
defaultGateway = (arr2[1].split("\\n"))[0];
Anyone has better ideas to use some regex???
Thanks in advance.