Regular Expressions 101

Community Patterns

Regex for MAC address with unit tests

0

Regular Expression
PCRE (PHP <7.3)

/
^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$
/
g

Description

no description available

Submitted by anonymous - 7 years ago