community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Text to column and then delete all between two characters

Meteor

Hi All , 

 

I have the following text field 

E.G : $0-$100 (1)|$101-$250 (17)|$251-$500 (17)|Men's (35)|Yellow Gold (35)|20.00 Inch (35)

 

I am trying to achieve the following 

  • Parse everything after |
  • Delete everything that starts with '(' and ends with ')'

 

I tried the following :

  1. Text to column - delimiter is | - WORKS 
  2. Multi Field Formula and apply Regex  (.*)\(.* - DOES NOT WORK 
  3. RegEx Tool with expression (.*)\(.* - WORKS ONLY ON THE LAST - Eg Only removed (35) from above example

 

Can someone point me in the right direction. 

 

Pulsar

Try this for your RegEx:

 \(.*?\)

In the attached it looks like it's working as needed.  I put the RegEx before the Text to Columns just so I could do it on a single column instead of using the Multi-Field.

Labels