UUID & GUID Regular Expression

Category: Strings

A regular expression to match GUID (Globally Unique IDentifier) and/or UUID (Universally unique identifier).

/^[a-f\d]{4}(?:[a-f\d]{4}-){4}[a-f\d]{12}$/i

What Is UUID & GUID

A universally unique identifier (UUID) is a 128-bit label used for information in computer systems. The globally unique identifier (GUID) is also used, often in software created by Microsoft.

UUID & GUID Examples:

  • e155518c-ca1b-443c-9be9-fe90fdab7345
  • 41E3DAF5-6E37-4BCC-9F8E-0D9521E2AA8D
  • 00000000-0000-0000-0000-000000000000
Rate This Regex
Sending
User Review
0 (0 votes)

Expression Flags

Flags Description
i Ignore case sensitive.
g Allows global search.
m Allows multiline search.