🟩 Sheet Formulas

REGEXMATCH in Google Sheets

Use REGEXMATCH to test whether text matches a pattern — does a cell contain a number, an email shape, or one of several words — returning TRUE or FALSE.

=REGEXMATCH(A2, "[0-9]")

Returns TRUE if A2 contains at least one digit, FALSE otherwise.

How it works

REGEXMATCH takes a text value and a regular expression and returns TRUE if any part of the text matches. It's the yes/no companion to REGEXEXTRACT and is great inside IF, FILTER, or COUNTIF-style checks. Use | for "or", ^ and $ to anchor to the start/end, and (?i) at the front of the pattern for case-insensitive matching.

Variations

Contains any of several words

=REGEXMATCH(A2, "apple|banana|cherry")

The pipe | means OR — TRUE if any of the words appears.

Case-insensitive match

=REGEXMATCH(A2, "(?i)urgent")

(?i) makes the match ignore upper/lower case.

Use inside IF

=IF(REGEXMATCH(A2, "@"), "email", "other")

Branch based on whether the pattern is present.

Exact whole-cell match

=REGEXMATCH(A2, "^[0-9]{5}$")

^ and $ anchor the pattern so the whole cell must be exactly 5 digits.

Examples

ScenarioFormula
Flag rows containing a number=REGEXMATCH(A2, "\d")
Looks like an email=REGEXMATCH(A2, ".+@.+\..+")
Filter rows that match=FILTER(A2:A, REGEXMATCH(A2:A, "(?i)paid"))

FAQ

How do I make REGEXMATCH case-insensitive?

Put (?i) at the start of the pattern, e.g. REGEXMATCH(A2, "(?i)done") matches Done, DONE, and done.

How do I check for several words at once?

Separate them with the pipe: REGEXMATCH(A2, "red|green|blue") is TRUE if any of them appears.

How do I require an exact match?

Anchor the pattern with ^ at the start and $ at the end, e.g. "^[0-9]{5}$" for exactly five digits.

Related formulas