Validating GUID or UUID


How to write a regular expression to validate GUID (Globally Unique IDentifier) or UUID (Universally Unique IDentifier)?

Here is a list of good and bad GUID examples:



Here is a regular expression to parse file entries from output of the "dir" command on Windows systems: with multiple lines and ignore case modifiers "mi": Note that:

[0-9A-F]{8}   - 8 hexadecimal digits

Click the button to test this regular expression here online:

2013-02-01, 11248👍, 0💬