正则匹配
static bool matches(String regex, String? input) { if (input == null || input.isEmpty) return false; return RegExp(regex).hasMatch(input); }