# REGEXMATCH formula generator

> Describe what you need and get a REGEXMATCH formula for Google Sheets, run on real data before you copy it. Plus 8 tested REGEXMATCH examples.

Source: https://spreadsheetpractice.com/tools/formula-generator/regexmatch · Updated October 29, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on November 20, 2026

REGEXMATCH checks whether text contains a match for a regular expression and returns TRUE or FALSE.

Describe the task at [REGEXMATCH formula generator](https://spreadsheetpractice.com/tools/formula-generator/regexmatch) and get a REGEXMATCH formula for Google Sheets, tested on real data.

## Tested REGEXMATCH examples

### Check if an email address is valid

`=REGEXMATCH(A2,"^[^@\s]+@[^@\s]+\.[A-Za-z]{2,}$")`

Google Sheets. Result on the sample sheet: 6 rows (B2:B7). [See it and try it](https://spreadsheetpractice.com/formulas/check-if-an-email-address-is-valid)

### Why does REGEXMATCH not work on numbers

`=REGEXMATCH(TO_TEXT(A2),"^2026")`

Google Sheets. Result on the sample sheet: 6 rows (B2:B7). [See it and try it](https://spreadsheetpractice.com/formulas/regexmatch-error-on-numbers)

### Filter rows with REGEXMATCH

`=FILTER(A2:B10,REGEXMATCH(B2:B10,F1))`

Google Sheets. Result on the sample sheet: 4 rows (E3:F6). [See it and try it](https://spreadsheetpractice.com/formulas/filter-rows-with-regexmatch)

### Count cells that match a regex

`=SUMPRODUCT(--REGEXTEST(A2:A11,D1))`

Excel. Result on the sample sheet: 5. [See it and try it](https://spreadsheetpractice.com/formulas/count-cells-that-match-a-regular-expression)

### Check if text is all uppercase

`=EXACT(A2,UPPER(A2))`

Excel. Result on the sample sheet: 6 rows (B2:B7). [See it and try it](https://spreadsheetpractice.com/formulas/check-if-text-is-all-uppercase)

### Count cells that contain a whole word

`=SUMPRODUCT(--ISNUMBER(SEARCH(" "&E1&" "," "&A2:A10&" ")))`

Excel. Result on the sample sheet: 5. [See it and try it](https://spreadsheetpractice.com/formulas/count-whole-word-matches)

### Count cells that contain one of several words

`=SUMPRODUCT(--((ISNUMBER(SEARCH(E1,A2:A10))+ISNUMBER(SEARCH(E2,A2:A10)))>0))`

Excel. Result on the sample sheet: 6. [See it and try it](https://spreadsheetpractice.com/formulas/count-cells-that-contain-one-of-several-words)

### Look up a value with a regular expression

`=FILTER(A2:B9,REGEXMATCH(A2:A9,E1))`

Google Sheets. Result on the sample sheet: 5 rows (E2:F6). [See it and try it](https://spreadsheetpractice.com/formulas/regex-lookup-google-sheets)

## Questions

### What does the REGEXMATCH formula generator do?

You describe the task in plain English, and it writes the formula, using REGEXMATCH where that's the right tool, for your table or a sample one. The formula is run in our engine in Google Sheets mode before you see it, so you get its result, not just a guess.

### What does REGEXMATCH do?

REGEXMATCH checks whether text contains a match for a regular expression and returns TRUE or FALSE.

### Can I learn to write REGEXMATCH formulas myself?

Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the REGEXMATCH function page has a practice exercise.

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
