Splitting Email Address in Make

Hello Make Community,
I’ve been working on a problem and I’m hoping for your guidance. I’m trying to parse an email address in such a way that I only keep the domain name, including the top-level domain.
The input will be [name]@domain.com and the result should be domain.com

Here’s what I’ve been attempting:
split(Email; "@")[1]

The idea is to split the email address at the ‘@’ character and then select the second part, which should be the domain name. However, I’m encountering a problem with the “[1]” part of the function. It appears that the function is returning both parts of the string, rather than just the part after the ‘@’ character.

Right now I am getting the result : [name], domain.com[1]

Thank you in advance for your help.

Best Regards,

Hey Marc!

You’re close. I would recommend the last or get function. split will output an array:


So we can do either of these:

And that will get you what you want!


1 Like

Hey Bruno,
thank you very now it’s working!

1 Like