in reply to Regular Expression for MAC Address
Are you trying to extract the address or just check for a match?
To check for a match:
To extract the address:/^([0-9a-f]{2}([:-]|$)){6}$/i
To match and extract an address whole, from a line containting other text:@nums = split /[:-]/, $mac;
/((?:[0-9a-f]{2}[:-]){5}[0-9a-f]{2})/i
MeowChow s aamecha.s a..a\u$&owag.print
|
---|
In Section
Seekers of Perl Wisdom