Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!

Alteryx Designer Desktop Discussions

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

Text to column and then delete all between two characters

saivig68
Meteoro

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 RESPOSTAS 2
danrh
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
Átomo

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

Rótulos
Autores com maior número de soluções