Alteryx Designer Desktop Discussions

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

How to remove commas

tsumadeep
6 - Meteoroid

for below challenges I tried with Trim, Replace, functions in formula, But I didnt got the expected output as mentioned below, Can an one please help over this 

CASE 1:Input

"
,,
,,
ID,True
ID,False
,,

 

Now I want to remove ",,"  can any one help how can I do this, below mentioned is the output, How can I get

Output

 
 
ID,True
ID,False
 

 

CASE 2: 

BD
CG
,
seg,Foun
seg,Foun
,

 

Now In case2 I want to remove ","  below mentioned is the output, How can I get,

 Output:

BD
CG
 
seg,Foun
seg,Foun
 
2 REPLIES 2
jdminton
12 - Quasar

Using Replace([Field1], ",","") will remove all commas from the data. Using ",," only replaces instances where there are two in a row.

Felipe_Ribeir0
16 - Nebula

Hi @tsumadeep 

 

One way of doing this:

REGEX_REPLACE([INPUT], '^(\,{1,})','')

regex.png

Labels