Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Python

r"
((?:[\da-fA-F]{2}[\s:.-]?){6})
"
gm

Description

Captures MAC addressess in any format: aa bb cc dd ee ff aa-bb-cc-dd-ee-ff aa:bb:cc:dd:ee:ff aabb.ccdd.eeff aabbccddeeff

Submitted by Gilian - 9 years ago