Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
((([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2}))|(([0-9]{2,3}[:-]){5}([0-9]{2,3})))
/
gm

Description

mac address validation in hex or decimal form

Submitted by planetwatch.io - 2 years ago