in reply to Regex overlap in MAC address
$ perl -le' $mac = "0:13:46:b:4:31"; $mac =~ s/([^:]+)/ sprintf "%02x", hex $1 /eg; print $mac; ' 00:13:46:0b:04:31 $ perl -le' $mac = "0:13:46:b:4:31"; $mac = join ":", map sprintf( "%02x", hex ), split /:/, $mac; print $mac; ' 00:13:46:0b:04:31
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex overlap in MAC address
by Skeeve (Parson) on Sep 11, 2006 at 20:28 UTC |