I have a field that contains email addresses, I want to use regex to strip everything before the @ symbol to give me just the domain e.g.
firstname.lastname@example.org => apple.com email@example.com => apple.com
How can I do this will a simple function?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
Without regex, you can use this:
if A1 contains 'firstname.lastname@example.org' then in B1 you can place the following formula:
If all that is in the field is an email address and you don't have to worry about validation, then
.+@ will match everything up to the domain name. if you need a search and replace, then use the same search string and leave the replace "expression" empty. That should replace what is matched with nothing.