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.
email@example.com => apple.com firstname.lastname@example.org => 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
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.