Skip to main content

Hello everybody : ) 

Does anybody know how to extract only the domain from an email adress with the formatter ?

Like the following :

“me@company.com” → “company”

 

Thanks a lot :smile:

Hi @optimio 

Formatter > Text > Split (@) and keep the last segment.


Hi @optimio!

For a more complex extraction like this, you can use the Formatter’s “Extract Pattern” transform option. This allows you to provide a Regular Expression to find a match. Regular Expressions can look pretty intimidating, but I believe the following the pattern should achieve what you’re looking for:

(?<=@)e^.]*.t^.]*(?=\.)

 

 

This would produce the following output:

 

 

Let me know if this helps or if you have any other questions!


Hi @optimio 

Formatter > Text > Split (@) and keep the last segment.

This will keep “.com” in the output, but it’s definitely a simpler solution if that isn’t an issue!