uuid property
Matches UUIDs by version.
uuid['3']
: Matches UUID version 3uuid['4']
: Matches UUID version 4uuid['5']
: Matches UUID version 5uuid['all']
: Matches any valid UUID
Use Case: API keys, database identifiers, sessions
Implementation
static final Map<String, RegExp> uuid = {
'3': RegExp(r'^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$'),
'4': RegExp(r'^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$'),
'5': RegExp(r'^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$'),
'all': RegExp(r'^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$'),
};