regex method
Checks if the string matches the given regex pattern.
@param source The regex pattern to match against. @return True if the string matches the pattern, false otherwise.
Implementation
bool regex(String source) => RegExp(source).hasMatch(this);