Match.regExp constructor

Match.regExp(
  1. RegExp rexExp, {
  2. String? mis,
})

Constrains input data to values that the regular expression regExp has a match.

mis the error message in case of a mismatch between the input data and pattern; the default value is 'mismatch'.

Implementation

Match.regExp(RegExp rexExp, {String? mis})
    : _pattern = rexExp,
      _mismatch = mis ?? 'mismatch';