Alteryx Designer Desktop Discussions

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

Text to column and then delete all between two characters

saivig68
7 - 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. 

 

2 REPLIES 2
danrh
13 - 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.

rpacheco020
5 - Atom

I had the same situation but all the information was between the symbols < and > and it wasn't working. 

I had to first replace all < by ( and > by )

After that, your expresion worked perfectly. Thank you very much

Labels