0
0
Google Sheetsspreadsheet~5 mins

REGEXMATCH and REGEXEXTRACT in Google Sheets - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the REGEXMATCH function do in Google Sheets?

REGEXMATCH checks if a text matches a pattern you give it. It returns TRUE if it matches, and FALSE if it does not.

Click to reveal answer
beginner
How does REGEXEXTRACT work in Google Sheets?

REGEXEXTRACT finds and returns the part of the text that matches the pattern you give. If nothing matches, it returns an error.

Click to reveal answer
beginner
Example: What will =REGEXMATCH("apple pie", "apple") return?

This will return TRUE because the text "apple pie" contains the word "apple" which matches the pattern.

Click to reveal answer
beginner
Example: What will =REGEXEXTRACT("Order #12345", "\d+") return?

This extracts the first group of digits from the text. It will return 12345.

Click to reveal answer
beginner
What happens if REGEXEXTRACT finds no match?

If no match is found, REGEXEXTRACT returns an #N/A error because it cannot extract anything.

Click to reveal answer
What does REGEXMATCH return when the pattern matches the text?
AFALSE
BThe matching text
CTRUE
DAn error
Which function extracts the matching part of text based on a pattern?
AREGEXEXTRACT
BSEARCH
CREGEXREPLACE
DREGEXMATCH
What will =REGEXMATCH("hello world", "world") return?
AFALSE
BTRUE
Cworld
D#N/A error
What does \d+ mean in a regex pattern?
AOne or more digits
BOne or more letters
CAny character
DWhitespace
If REGEXEXTRACT does not find a match, what happens?
AReturns empty string
BReturns FALSE
CReturns TRUE
DReturns #N/A error
Explain how you would use REGEXMATCH to check if a cell contains the word "cat".
Think about how to write the pattern and what the function returns.
You got /3 concepts.
    Describe a situation where REGEXEXTRACT would be useful and how it works.
    Consider extracting numbers or words from a longer text.
    You got /3 concepts.