Domain of an email address
A Google Sheets formula exercise from Sheetsdrill. Solve it with a formula bar on a live sheet in your browser, and it is checked the moment you submit.
The task
Return the domain of each email address, the part after the @, using REGEXEXTRACT with a capture group. Fill B2 and B3.
What this exercise teaches
Without the group, the result would include the @ sign. A capture group lets the pattern anchor on text you do not want to keep, which is cleaner than extracting and then trimming.
A hint if you get stuck
Parentheses in a pattern mark a capture group, and REGEXEXTRACT returns only what the group matched. "@(.+)$" matches the @ but captures just what follows it.
Try it now, free, no account needed
The first 15 tasks on Sheetsdrill are free. Open it on the practice page, solve it, and get instant feedback with a hint. A free account adds the worked solution; Pro adds timed mode and the certificate.
Open this exerciseMore exercises in Text and dates
- First name with SPLITPro
- Join the confirmed namesPro
- Address without gapsPro
- Valid order IDsPro
- Pull out the invoice numberPro
- Digits onlyPro
- Month label with TEXTPro
- Full years of servicePro
- Working days with holidaysPro
- Due at the end of next monthPro
- Tidy up pasted namesPro
- Items in a comma listPro
- Renewal date with EDATEPro
- Orders placed at the weekendPro
- Amount inside a sentencePro