hasMatch static method
Checks if a given value
matches a pattern
using a regular expression.
Returns true
if the value
matches the pattern
, false
otherwise.
Implementation
static bool hasMatch(String? value, String pattern) {
return (value == null) ? false : RegExp(pattern).hasMatch(value);
}