Skip to main content
MATCH
Tom Williams avatar
Written by Tom Williams
Updated over a year ago

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" returns true when the author username starts with "jo".

  • MATCH(url, "github.com") returns true when the URL contains "github.com", otherwise returns false.

  • title ~ "(?c)fix" returns true when the title of the item contains "fix" at any place in a case sensitive manner. Otherwise returns false.


โ€‹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

Did this answer your question?