Regular expression for a MAC address (ethernet)

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1481
Joined: Fri Aug 29, 2003 8:39 pm

Regular expression for a MAC address (ethernet)

Post by ^rooker »

VIM:

Code: Select all

\(\([0-9A-Fa-f]\)\{2\}:\?\)\{6\}
Perl:

Code: Select all

(([0-9A-Fa-f]){2}:?){6}
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply