Complete the formula to check if cell A1 contains the word "cat".
=REGEXMATCH(A1, [1])The formula =REGEXMATCH(A1, "cat") returns TRUE if the text in A1 contains the word "cat".
Complete the formula to extract the first number from cell B2.
=REGEXEXTRACT(B2, [1])The pattern "\\d+" matches one or more digits, so =REGEXEXTRACT(B2, "\\d+") extracts the first number from the text.
Fix the error in the formula to extract the domain from an email in cell C3.
=REGEXEXTRACT(C3, [1])The pattern "@(.+\\..+)" correctly extracts the domain part after the '@' including the dot and domain extension.
Fill both blanks to create a formula that checks if cell D4 contains a 3-letter word starting with 'a'.
=REGEXMATCH(D4, [1] & [2])
\\b.The pattern "\\ba" means word boundary followed by 'a', and "\\w{2}\\b" means two word characters followed by word boundary. Together they form \\ba\\w{2}\\b which checks for a 3-letter word starting with 'a'.
Fill all three blanks to extract the area code (3 digits) from a phone number in cell E5 formatted like (123) 456-7890.
=REGEXEXTRACT(E5, [1] & [2] & [3])
The pattern "\\(" matches the opening parenthesis, "(\\d{3})" matches and captures exactly 3 digits (the area code), and "\\)" matches the closing parenthesis. Together they extract the area code from the phone number.