# 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}$