UUID (Any Version)
beginnerMatches UUID strings of any version in standard hyphenated format.
uuididentifiervalidation
Pattern
/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/giTry It
0 of 5 strings matched
Explanation
Matches the standard UUID format: five groups of hexadecimal digits in 8-4-4-4-12 pattern separated by hyphens. Does not validate version or variant nibbles.
Test Strings
Matching
- 550e8400-e29b-41d4-a716-446655440000
- 6ba7b810-9dad-11d1-80b4-00c04fd430c8
- 00000000-0000-0000-0000-000000000000
Non-matching
- not-a-uuid-at-all-nope
- 550e8400e29b41d4a716446655440000
Language Compatibility
| Language | Support |
|---|---|
| JS | Full support |
| PYTHON | Full support |
| JAVA | Full support |
| PHP | Full support |
| GO | Full support |
Code Snippets
const regex = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi;
const text = "your text here";
const matches = text.match(regex);
console.log(matches);