hasMatch static method

bool hasMatch(
  1. String? value,
  2. String pattern
)

字符串是否符合正则表达式

Implementation

static bool hasMatch(String? value, String pattern) {
  return (value == null) ? false : RegExp(pattern).hasMatch(value);
}