Start Free Trial

Alteryx Designer Desktop Discussions

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

Removing Excess Comma's in an Concatenated Field

smoskowitz
12 - Quasar

Hello --

 

I am working on a project and have a challenge that is eluding me. I have concatenated about 7 fields using a comma (,).

 

1) ,,,,CBC500,,,,CBC501,,

2) ,,,,,CBC100,,,,,

 

How do I keep a single comma to delineate, but remove any unnecessary commas. So for item 1, I want to see:

 

CBC500,CBC501

 

Thanks,

Seth

11 REPLIES 11
davidskaife
14 - Magnetar

Hi @Anudeep_Yalamuru 

 

Ah ha, its because you have whitespace inbetween the comma's - the regex provided only works if the comma's contain no whitespace.

 

Try this, its not eloquent by any means but it works!

 

Regex_Replace([Address]," ,","")
Anudeep_Yalamuru
8 - Asteroid

Thanks @davidskaife It removed all the commas. Im happy with that for now. But I understood what you meant and you are right about the whitespace. Appreciate your responses.

Labels
Top Solution Authors