Type: Function
Function: MATCH
Syntax: MATCH(string, regex)
or alternatively the shorthand version string ~ regex
Description: Returns true
if the first argument matches the regular expression provided as the second argument. Also available as ~
.
Matching is case insensitive by default. You can make the regex case sensitive by adding (?c)
at the beginning of your regex.
The regex must be a POSIX regular expression. You can use this tool to test regular your expressions
Sample usage:
MATCH(author_username, "^jo")
=author_username ~ "^jo"
returnstrue
when the author username starts with "jo".MATCH(url, "github.com")
returnstrue
when the URL contains "github.com", otherwise returnsfalse
.title ~ "(?c)fix"
returnstrue
when the title of the item contains "fix" at any place in a case sensitive manner. Otherwise returnsfalse
.
โRegular Expression cheat sheet.:
"^fix"
string starts with "fix""fix$"
string ends with "fix""(?c)fix"
string contains "fix" (case-sensitive)"fix|bug"
string contains "fix" or "bug"Test more regular expressions using this tool