matchUuidv4 function
Return true
if the string uuid
has a Uuid v4 format.
Implementation
bool matchUuidv4(String uuid) {
final regExp = RegExp(
r'^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$',
caseSensitive: false,
);
return regExp.hasMatch(uuid);
}