Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(^\{?[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}\}?)$
/
i

Description

This pattern search case insensitive for a valid GUID: a combination of A-Z and 9-0 in four groups delimited by a dash: [8]-[4]-[4]-[4]-[12].

Submitted by Fallon Turner - 8 years ago