ifMatches static method

Converter<bool> ifMatches(
  1. dynamic regexp
)

Returns true if an attribute's string matches a regular expression. The expression is a raw string (r'foo').

Implementation

static Converter<bool> ifMatches(regexp) => (s) => RegExp(regexp).hasMatch(s);