Javascript Check Format Uuid

// Regular expression to check if string is a valid UUID
const regexExp = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/gi;

// String with valid UUID separated by dash
const str = "a24a6ea4-ce75-4665-a070-57453082c256";

regexExp.test(str); // true
patrick204nqh