Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^[0-9a-f]{8}(?:\-[0-9a-f]{4}){3}-[0-9a-f]{12}$
/
gm

Description

UUID v7

Resources: https://uuid7.com/ https://uuid.ramsey.dev/en/stable/rfc4122/version7.html https://www.ietf.org/archive/id/draft-peabody-dispatch-new-uuid-format-04.html#name-uuid-version-7

"UUID version 7 features a time-ordered value field derived from the widely implemented and well known Unix Epoch timestamp source, the number of milliseconds seconds since midnight 1 Jan 1970 UTC, leap seconds excluded. As well as improved entropy characteristics over versions 1 or 6." Source IETF

Submitted by Regex by Ignacio del Corro / cxto21 - 16 days ago (Last modified 12 days ago)