test if uuid is valid code example
Example: check if string is uuid
// For test 01234567-9ABC-DEF0-1234-56789ABCDEF0 use Regex
Regex reg = new Regex("/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/");
// with brackets
Regex reg = new Regex("/^\{?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\}?$/");
// use https://regexr.com/ for a REGEX builder