0
0
Google Sheetsspreadsheet~20 mins

REGEXMATCH and REGEXEXTRACT in Google Sheets - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Regex Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate
1:30remaining
Output of REGEXMATCH with simple pattern
What is the output of the formula =REGEXMATCH("apple pie", "pie")?
Google Sheets
=REGEXMATCH("apple pie", "pie")
ATRUE
B#ERROR!
CFALSE
Dapple pie
Attempts:
2 left
💡 Hint
REGEXMATCH returns TRUE if the pattern is found anywhere in the text.
📊 Formula Result
intermediate
1:30remaining
Extracting a number with REGEXEXTRACT
What is the result of =REGEXEXTRACT("Order #12345", "\d+")?
Google Sheets
=REGEXEXTRACT("Order #12345", "\d+")
A12345
B#12345
COrder
D#ERROR!
Attempts:
2 left
💡 Hint
The pattern \d+ matches one or more digits.
Function Choice
advanced
2:00remaining
Choose the correct formula to check if text starts with 'cat'
Which formula correctly returns TRUE if cell A1 starts with the word "cat"?
A=REGEXEXTRACT(A1, "cat$")
B=REGEXMATCH(A1, "^cat")
C=REGEXMATCH(A1, "cat$")
D=REGEXEXTRACT(A1, "^cat")
Attempts:
2 left
💡 Hint
The caret ^ means the start of the text in regex.
🎯 Scenario
advanced
2:00remaining
Extract domain name from email address
You have email addresses in column A like "user@example.com". Which formula extracts only the domain name (example.com)?
A=REGEXMATCH(A1, "^(.+)@")
B=REGEXMATCH(A1, "@(.+)$")
C=REGEXEXTRACT(A1, "@(.+)$")
D=REGEXEXTRACT(A1, "^(.+)@")
Attempts:
2 left
💡 Hint
Use REGEXEXTRACT to get the part after @.
data_analysis
expert
2:30remaining
Count how many cells in range B1:B10 contain a 3-digit number
Which formula correctly counts cells in B1:B10 that contain any 3-digit number anywhere in the text?
A=COUNTIF(B1:B10, "*\d{3}*")
B=SUM(REGEXEXTRACT(B1:B10, "\d{3}"))
C=COUNTIF(B1:B10, "*###*")
D=SUMPRODUCT(REGEXMATCH(B1:B10, "\d{3}"))
Attempts:
2 left
💡 Hint
REGEXMATCH returns TRUE/FALSE; SUMPRODUCT can sum TRUE as 1.