Validating GUID or UUID

Q

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:

✍: FYIcenter.com

A

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:

2022-10-01, 0👍, 2💬