Spreadsheet formulas explained, side by side

REGEXMATCH Function in Excel, Google Sheets, Airtable & Notion

REGEXMATCH returns TRUE when text matches a regular expression pattern anywhere in the string, and FALSE otherwise. REGEXMATCH("Order A-1042", "[A-Z]-\d{4}") is TRUE.

Syntax in each app

AppSupportSyntax & notes
Excel✔ Built inREGEXTEST(text, pattern, [case_sensitivity])
Microsoft 365 (2024)
Excel's version is called REGEXTEST. Set case_sensitivity to 1 to ignore case. Uses PCRE2, so lookaheads work. Older Excel has no regular expressions; use SEARCH with wildcards for simple patterns.
Google Sheets✔ Built inREGEXMATCH(text, regular_expression)
Uses Google's RE2 syntax: no lookaheads or backreferences. Add (?i) at the start to ignore case.
Airtable✔ Built inREGEX_MATCH(string, regex)
Also RE2, like Google Sheets, and case-sensitive unless the pattern starts with (?i). Airtable shows the result as 1 or 0.
Notion✔ Built intest(text, pattern)
Returns true or false. There are no flags, so for a case-insensitive test, lowercase the text and write the pattern in lowercase: test(lower(prop("Name")), "inv-\\d+").
Try REGEXMATCH with your own values
Start with (?i) to ignore case
Result (as Excel & Google Sheets return it)
TRUE
Your formula, ready to paste
Excel=REGEXTEST("Order A-1042 shipped", "[A-Z]-\d{4}") open excel.new ↗
Google Sheets=REGEXMATCH("Order A-1042 shipped", "[A-Z]-\d{4}") open sheets.new ↗
AirtableREGEX_MATCH("Order A-1042 shipped", "[A-Z]-\\d{4}")
Notiontest("Order A-1042 shipped", "[A-Z]-\\d{4}")

The tester uses your browser's JavaScript regex engine, which agrees with RE2 for everyday patterns. Lookarounds and backreferences are reported as errors, as Google Sheets does; RE2-only syntax such as (?P<name>…) or [[:alpha:]] may not work here. Google Sheets returns #REF! for an invalid pattern; Excel returns #VALUE!.

Arguments

ArgumentWhat it means
textThe text to test.
regular_expressionThe pattern. It matches anywhere in the text unless you anchor it with ^ (start) and $ (end).

Examples

FormulaResultWhyCopy
=REGEXMATCH("Order A-1042 shipped", "[A-Z]-\d{4}")TRUELetter, dash, four digits anywhere in the text.
=REGEXMATCH("90210", "^\d{5}$")TRUEAnchors make the whole value match: a 5-digit ZIP code.
=REGEXMATCH("Invoice", "(?i)^inv")TRUE(?i) ignores case.
=REGEXMATCH("ada@example", "^[^@\s]+@[^@\s]+\.[a-z]{2,}$")FALSEA basic email check: no dot in the domain.

Examples use Excel / Google Sheets syntax unless noted.

How REGEXMATCH works

A regular expression describes a pattern rather than fixed text, so one formula can check “a letter followed by a dash and four digits”, “a 5-digit ZIP code” or “looks like an email address”. REGEXMATCH returns TRUE or FALSE, which makes it a good fit for data validation, conditional formatting and FILTER conditions: =FILTER(A2:A100, REGEXMATCH(A2:A100, "^INV-")). Its sister functions REGEXEXTRACT and REGEXREPLACE (Airtable: REGEX_EXTRACT and REGEX_REPLACE) pull out or rewrite the matched part.

The pattern matches anywhere in the text unless you anchor it: "\d{5}" is TRUE for “Order 123456”, while "^\d{5}$" requires exactly five digits. Matching is case-sensitive; start the pattern with (?i) in Google Sheets, Airtable and Excel to ignore case. Google Sheets and Airtable use the RE2 engine, which has no lookaheads ((?=…)) or backreferences (\1). Excel's REGEXTEST uses PCRE2 and supports both. REGEXMATCH only works on text, so convert numbers first with TO_TEXT(A2) or A2&"".

In Excel the function is called REGEXTEST and only exists in Microsoft 365. Airtable's REGEX_MATCH works like Google Sheets. Notion's test(text, pattern) does the same, but has no inline flags, so lowercase the text for a case-insensitive test. In Airtable and Notion string literals, a regex backslash is written twice, as in "\\d".

Frequently Asked Questions

How do I make REGEXMATCH ignore case?
Put (?i) at the start of the pattern: =REGEXMATCH(A2, "(?i)urgent"). In Excel use REGEXTEST(A2, "urgent", 1); in Notion use test(lower(prop("Notes")), "urgent").
Why does REGEXMATCH return an error on a number?
It only accepts text. Convert the value first: =REGEXMATCH(A2&"", "^\d+$") or TO_TEXT(A2).

Part of the Text functions. Results in the tester follow Excel and Google Sheets behaviour; always double-check important work in your own file.