notMatch()function

notMatch(str: string, regexp: Matchable): boolean
ParamType
strstring
String to test against the regular expression. required
regexpMatchable
Regular expression to test against the string.
- If regexp is a RegExp it is tested against the string using RegExp.test().
- If regexp is a string it is simply tested against the string using !== equality. required
Return
boolean
true if the string does not match the regular expression, otherwise false.

Does a string not match against a regular expressions or string.

  • Use with filter() to negatively filter iterable sets of items.

Examples

notMatch("abc", /z/); // true