AG
Regex
AGREGEX
About
Cheat Sheet
Pattern Library
Guides
Contact
한국어
English
日本語
中文
Español
Português
Français
Deutsch
Русский
العربية
Bahasa Indonesia
← Pattern Library
PATTERN
UUID v4
Regex Pattern
Dev · Data
/
\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}\b
/gi
Copy
/\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}\b/gi
Dev · Data
Flags:
gi
Description
Matches standard UUIDs in the hyphen-separated 8-4-4-4-12 layout. It checks the version digit (1–5) and the variant digit so that only well-formed values are caught. Useful for extracting identifiers from database keys or logs.
Example Matches
550e8400-e29b-41d4-a716-446655440000
Test String
id: 550e8400-e29b-41d4-a716-446655440000
Open this pattern in the tester
Other Patterns
IPv4 Address
IPv6 Address
HTML Tag
← Pattern Library