Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Simple regex - find and replace

Hamder83
11 - Bolide

Hi 

I'm clearly not smart enough to figure regex. 

I simply wanna find and replace specific text values from a column.

Ex.:

Service:
ADV BPT IST
ADV
IST
PNT ADV 

 

and so on 


For each row I wanna find and replace ADV, BPT AND IST and replace with nothing.

I was trying 
https://regex101.com/
But I still dont get it 😕 

Thanks in advance, 

3 REPLIES 3
afv2688
16 - Nebula
16 - Nebula

Hello @Hamder83 ,

 

Maybe regex is not the best solution for what you are looking for given that if another word that you don't want to remove shares the same pattern it would also me removed. If they are specific text strings I would recommend you trying to use the find replace tool.

 

Put all the words in a list and have them replaced with an empty value

 

Regards

Sebastiaandb
12 - Quasar

Hi, 

 

Just use the formula tool (as in the screenshot below, tekst would be your column name) and use the REGEX_Replace function (f.e. REGEX_Replace([tekst], 'ADV', '')). Depends on how complex your matches are going to be but this would be the most simple solution :-): 

 

 

Sebastiaandb_0-1617700263926.png

 

Hamder83
11 - Bolide

Cheers

@afv2688  and @Sebastiaandb  both ways seem to work! 🙂 

I really appriciate the help 

Labels
Top Solution Authors