hasMatch static method

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

Returns whether the pattern has a match in the string input.

Implementation

static bool hasMatch(String? str, String pattern) =>
    str == null ? false : RegExp(pattern).hasMatch(str);