Test, validate and match regular expressions
This regex validates GUID/UUID strings with flexible formatting options. It supports both hyphenated (8-4-4-4-12) and non-hyphenated formats, ensuring consistent brace usage where a closing brace requires an opening brace. The pattern enforces hexadecimal characters (0-9, a-f, A-F) and proper segment lengths, making it suitable for validating identifiers in database records, API payloads, or system-generated unique IDs.