We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Regex - get data when multiple groups can exist within their own parentheses group

alex
11 - Bolide

Test line 1 (ABC) (DEF) - need DEF to be extracted

Test line 2 (GHIJ) (KL) (MNO) - need MNO to be extracted

Test line 3 (PQR) - need PQR to be extracted

 

If multiple groups of parentheses exist then need the last group.  I'd like for the data I need to be in the same column if possible.  Any help would be appreciated.

5 REPLIES 5
binuacs
21 - Polaris

@alex One way of doing this

 

binuacs_0-1672836669876.png

 

alex
11 - Bolide

(.+)(\<\w+\>) seemed to do the trick to just grab the last one.  Would like to see if could grab each group as well if they exist.

grazitti_sapna
17 - Castor

@alex , You can use text to Columns in case of that as below:

 

grazitti_sapna_0-1672837507358.png

 

Sapna Gupta
Felipe_Ribeir0
16 - Nebula

hI @alex 

 

If by grabing each group you mean each group in a new column dynamically, here it is one way of doing this:

 

Felipe_Ribeir0_0-1672837622486.png

 

 

 

alex
11 - Bolide

Can you walk me thru the explanation of what the formula is doing.  Thanks!

 

Labels
Top Solution Authors