Split IP Address into variables
Posted: 12 Apr 2013 12:55
Hi there, Can someone please tell me how I can copy an IP Address to the clipboard then have a script split it into variables?
So:
192.168.2.4
Becomes:
$a = 192
$b = 168
$c = 2
$d = 4
I'm pretty sure I need regexreplace but I don't know how to get the separate sections of the IP Address. Cheers.
So:
192.168.2.4
Becomes:
$a = 192
$b = 168
$c = 2
$d = 4
I'm pretty sure I need regexreplace but I don't know how to get the separate sections of the IP Address. Cheers.