E
erik
I am using this regex pattern:
$addr =~s/.*([\w \d]{2}:[\w \d]{2}:[\w \d]{2}).*/$1/;
I am trying to match the first "nibbles" of the MAC address. So for MAC
00:00:0c:07:ac:65, I would only want 00:00:0c.
Oddly enough, my regex pattern match the last 3 nibbles, e.g. 07:ac:65.
My datastream is a "arp -an" on a solaris box. Format is like:
root $ arp -an
Net to Media Table: IPv4
Device IP Address Mask Flags Phys Addr
------ -------------------- --------------- ----- ---------------
eri0 xx.xx.xx.xx 255.255.255.255 00:00:0c:07:ac:65
eri0 xx.xx.xx.xx 255.255.255.255 08:00:20:ad:58:ec
I have tried many different regex patterns and after 2 hours I am
getting grey hairs. Can anyone help?
$addr =~s/.*([\w \d]{2}:[\w \d]{2}:[\w \d]{2}).*/$1/;
I am trying to match the first "nibbles" of the MAC address. So for MAC
00:00:0c:07:ac:65, I would only want 00:00:0c.
Oddly enough, my regex pattern match the last 3 nibbles, e.g. 07:ac:65.
My datastream is a "arp -an" on a solaris box. Format is like:
root $ arp -an
Net to Media Table: IPv4
Device IP Address Mask Flags Phys Addr
------ -------------------- --------------- ----- ---------------
eri0 xx.xx.xx.xx 255.255.255.255 00:00:0c:07:ac:65
eri0 xx.xx.xx.xx 255.255.255.255 08:00:20:ad:58:ec
I have tried many different regex patterns and after 2 hours I am
getting grey hairs. Can anyone help?