-
# Works with dash “-” and colon “:” as a separator
-
# The โ/iโ modifier at the end makes it case-insensitive (Perl-like syntax)
-
/^([0-9A-F]{2}[:-]){5}[0-9A-F]{2}$/i
-
# General syntax (match lower and upper case)
-
^([0-9a-fA-F]{2}[:-]){5}[0-9a-fA-F]{2}$