Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2021-05-07 17:25
Flavor·Python

r"
(?i)^[a-f\d]{2}([.:-]?)([a-f\d]{2}\1){4}[a-f\d]{2}$
"
gm
Open regex in editor

Description

Match mac address with :, -, ., or no dividers.

Submitted by Brandan Neises