Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Whats the best way to replace a group of text in a column with blanks?

zenSMP
7 - Meteor

Hi All,

 

As per title, whats the best way to replace a group of text in column with blank.

 

Example in the attached excel and photo below I would like to replace 3M/Nokia/Cisco in input with Blank and have it shown as output.

 

I understand formula, regex and find a replace may work but am wondering how would you guys write it.

Example the below may work but is it graceful or scalable.

TRIM(
REPLACE(

REPLACE(
REPLACE([Input],'3M','')

,'Nokia','')

,'Cisco',''))

Screenshot 2022-11-22 at 11.33.00 PM.png

11 REPLIES 11
Felipe_Ribeir0
16 - Nebula

Hi @zenSMP 

 

Here it is, with this expression you will be able to remove the first word of each row:

 

^(.*?)(?<=\s)

Felipe_Ribeir0_0-1669133017131.png

 

Felipe_Ribeir0
16 - Nebula

And with this one, you will be able to remove specific words, like 3M/Nokia/Cisco:

 

Felipe_Ribeir0_0-1669133153560.png

 

Labels