Alteryx Designer Desktop Discussions

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

Removing text within parenthesis and the parenthesis from cells

dgpaul10
5 - Atom

Afternoon, 

 

I trying to find a way to remove text that is at the end of each cell the exists within parenthesis.  

 

For Example 

 

Dillon Jones (DGJ)

Lewis (LP)

Jordan Caine (JC)

 

And I just want to display

 

Dillon Jones

Lewis

Jordan Caine

 

i have tried to use the regex tool but it does not seem to recognize searching for the "(" and I am not sure it that is because it is looking the countering ")"

 

Any insight would be greatly appreciated.

 

Thanks!

7 REPLIES 7
patrick_digan
17 - Castor
17 - Castor

@dgpaul10 ( is a special regex character, so you would have to precede it with a \ to denote the actual ( character. For example:

Regex_Replace([Field1]," \(.*?\)","")

seemed to work on my end...

dgpaul10
5 - Atom

Worked great! 

 

Thanks! 

viswamtulasi
7 - Meteor

I'm looking the opposite solution and will you please help me.

 

Example:  I've field text as below - 

1) Data Base (DB)

2) Data Analytics (DA)

3) Big Data (BA)

 

Need the the output in the field only withing parenthesis text as below -

1) DB

2) DA

3) BA 

GavinAttard
11 - Bolide

Hi

 

Slightly different process: 

 

1) use Regex tool to tokenise and extract the parenthesis. Then clean using regex tool in replacement mode. 

 

see attached. 

 

kr

Alteryx Everything, Leave no one behind.
viswamtulasi
7 - Meteor

It is working, Thank you so much.

davidhenington
10 - Fireball

Ask and you shall receive! I had totally forgotten about special chars! Using regex to build dynamic input in-db boooyah! 

mvtthewcornelison
7 - Meteor

Hello,


I have a similar problem to the one you solved above. Except for I have multiple parentheses in my cell. For example:

 

This (0.123%) is a (4.567%) test (95%). 

 

I want the output to be (0.123%)(4.567%)(95%). Thank you so much in advance for your help!!

Labels