Type: Function
Function: NOT_MATCH
Syntax: NOT_MATCH(string, regex)
Description: Returns true
if the first argument does not match the regular expression provided as second argument. The alternative shorthand version !~
is available.
The regex must be a POSIX regular expression. You can use this tool to test your regular expressions.
Note that backslashes (\
) need to be escaped in strings. So typical regex patterns such as \d
will have to be written \\d
in regex strings. See the examples below.
Sample usage:
NOT_MATCH(author_username, "^jo")
ORauthor_username !~ "^jo"
returnstrue
when the author username does not start with "jo".NOT_MATCH(url, "github.com")
returnstrue
when the URL does not contain "github.com", otherwise returnsfalse
.NOT_MATCH("1234", "\\d+")
returnsfalse
since the string contains numbers.title !~ "(?c)fix"
returnstrue
when the title of the item does not contain "fix" at any place, with any letter casing. Otherwise returnsfalse
.
Regular Expression cheat sheet
"^fix"
string starts with "fix""fix$"
string ends with "fix""(?c)fix"
string contains with "fix" (case-sensitive)"fix|bug"
string contains "fix" or "bug"Test more regular expressions using this tool