Community Patterns

Community Library Entry

0

Regular Expression
Created·2016-10-27 09:36
Flavor·Python

r"
^(?:[0-9a-zA-Z]{2}([:-]?))(?:[0-9a-zA-Z]{2}\1){4}[0-9a-zA-Z]{2}$
"
g
Open regex in editor

Description

6 pairs of hexadecimal characters separated by either 5 dashes, or 5 colons, or no separators at all. Mixture of separators not allowed.

Submitted by anonymous