Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Removing Special Characters From Email Addresses

Deano478
12 - Quasar

Hi all,

 

I have a list of email addresses like below and what I'm trying to is just remove any special characters from the emails:

 

So ideally they would be for example like: Lisa.OSullivan@test.com

 

Martin.O'Callaghn@test.com
Lisa.O'Sullivan@test.com
John.O'Shea@test.com
Mick.O'Hara@test.com
Dave.O'Hanka@test.com

 

Cheers for any insights in advance

4 REPLIES 4
ShankerV
17 - Castor

Hi @Deano478 

 

Please use the regex below.

 

REGEX_Replace([Field1], "[^a-z@.]",'')

 

ShankerV_0-1682000515513.png

 

Many thanks

Shanker V

 

 

binuacs
21 - Polaris

@Deano478 One way of doing this

binuacs_0-1682000376023.png

 

IraWatt
17 - Castor
17 - Castor

Hey @Deano478,

What is the final result you are looking for?

 

You can for instance use this regex to remove any non alpha numeric characters:

REGEX_Replace([test], "[^a-zA-Z_0-9 ]", " ")

The Square brackets indicate a set of characters you are looking for. The ^ is a not, there fore it replaces any non letter or number character to a space. Getting you this result:

IraWatt_0-1682000397659.png

 

Deano478
12 - Quasar

@binuacs  That worked like a charm as form me Regex is something I definitely need to get a better understanding of

Labels