Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Remove special characters from a sentence

KrishnaChithrathil
11 - Bolide

Can we remove all the special characters from a sentence. ?

This is my input. (We can't expect a fixed set of special characters. Any thing can occur in between the sentence.)

 

KrishnaChithrathil_1-1658906288441.png

 

This is my expected output

KrishnaChithrathil_2-1658906331688.png

 

8 REPLIES 8
DataNath
17 - Castor
17 - Castor

@KrishnaChithrathil I’m a little confused as the title just says remove special characters, but your expected outcome you’ve also removed valid letters - do you just want the first word up until a special character?

grazitti_sapna
17 - Castor

@KrishnaChithrathil, give this a try.

grazitti_sapna_0-1658906755623.png

 

and if you are just looking to remove the punctuations then use data cleansing tool with the following configuration.

grazitti_sapna_0-1658906962573.png

 

 

 

Thanks!

Sapna Gupta
KrishnaChithrathil
11 - Bolide

@DataNath 

Oops. My bad. take the first word until I see a special character. that's the correct scenario.

The example which i've provided is random data. I'm expecting any special character including a space in the client requirement.

KrishnaChithrathil
11 - Bolide

@grazitti_sapna 

Perfect. Thanks.

It'll take all the possible special characters, right?

binuacs
21 - Polaris

@KrishnaChithrathil one way of doing this

binuacs_0-1658911181566.png

 

grazitti_sapna
17 - Castor

@KrishnaChithrathil, it will work for punctuations can try all the possible special characters to test if it is working or not but according to me it should take out all special characters.

 

Thanks!

Sapna Gupta
KrishnaChithrathil
11 - Bolide

People who're looking into this topic, solution provided by @binuacs also works perfectly. I can take only one as the solution to my topic. 

 

Thanks.

grazitti_sapna
17 - Castor

@KrishnaChithrathil, you can mark multiple posts as solutions if they work for you. There is no restriction to that.

 

Thanks for marking my post as a solution, glad I could help.

 

Thanks!

Sapna Gupta
Labels
Top Solution Authors