Text·Lesson 42 of 62ProSheets only
How to use REGEXMATCH in Google Sheets
Test for a pattern
How REGEXMATCH works
REGEXMATCH returns TRUE if text contains a pattern. \d means any digit, and {3} means three of them. Sheets only.
REGEXMATCH(text, pattern)
Example on this data
=REGEXMATCH(B2,"acme")→TRUE
TRUE because the email contains "acme".
What you’ll do
You’ll check whether a note contains a phone number. Testing for a pattern lets you flag rows that need attention.
Try it
Type =REGEXMATCH(B2,"acme") into G2 and press Enter. Watch what the sheet does.
The result will appear in G2.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Full name | SKU | Note | ||||
| 2 | maria lopez | maria.lopez@acme.com | WID-2041-BLU | Call back 555-0142 | |||
| 3 | james chen | jchen@northwind.io | GAD-1180-RED | Sent invoice | |||
| 4 | Priya Shah | priya@shahdesign.co | WID-3307-GRN | Call back 555-0199 | |||
| 5 | tom o'neil | tom.oneil@acme.com | BOX-0042-BLU | Left voicemail | |||
| 6 | Lena Park | lena.park@globex.com | GAD-2215-BLK | Call back 555-0107 | |||
| 7 | sam reed | sreed@northwind.io | WID-0918-RED | Meeting Tue |
Ctrl+/ shows the shortcuts
Drill locked
Unlock the other 44 lessons for $49.99
You’ve seen how REGEXMATCH works. Pro lets you write it yourself on real data and get checked instantly, with practice sets and section reviews for every lesson.
Your drill
In G2, show TRUE if the note in D2 contains a phone number like 555-0142.
One payment, no subscription.