Alteryx Designer Desktop Discussions

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

Regex to remove characters inbetween ( )

RogerA
8 - Asteroid

I need to completely remove any characters in between pairs of brackets, so my data looks something like:

AB1234 (45-78) This is a widget 

 

And want it to look like:

AB1234 This is a widget 

 

Thanks

7 REPLIES 7
LordNeilLord
15 - Aurora

Hey @RogerA

 

Try: \(.*\)

 

RReplace.PNG

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome


Data Lover

RogerA
8 - Asteroid

Perfect thank you!  One day i will get the hang on this.

LordNeilLord
15 - Aurora

Here's an alternative using the formula tool :)

 

RReplace2.PNG

RogerA
8 - Asteroid

Thanks for all the help so far, i have just seen an anomaly in my data along the lines of:

 

AB1234 (98-44) This is a widget (66-45)

 

This has two sets of brackets, and the above solution when applied on this one removes everything after AB1234.  How can i amend the regex to make it look like:

 

AB1234 This is a widget

LordNeilLord
15 - Aurora

Hey @RogerA

 

If you add a question mark after the star it will capture both:

 

RReplace3.PNG

RogerA
8 - Asteroid

Thanks worked great

Nandy
8 - Asteroid

Hi Neil,

 

not exactly same situation, i need to remove certain positions of the string . say string of length 20 , i need to replace 10th to 12 position of the string as blank irrespective of any value. Could you offer some help

Labels