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!
Free Trial

Alteryx Designer Desktop Discussions

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

Syntax to extract complete value before last opening parenthesis and after last comma

pradnyaraibagkar
5 - Atom

Dynamic syntax to extract complete value before last opening parenthesis and after last comma.

 

Example : from the below text, output has to be System User,

 

Ekrem Rrahni (M379753), Marie Dietrich (M022543), Suprita Mg (A566060), System User (SYSTEM)

3 REPLIES 3
Bren_Spill
12 - Quasar
12 - Quasar

@pradnyaraibagkar - try this: .*\s(\w+\s\w+\s\(\w+\))

 

image.png

pradnyaraibagkar
5 - Atom

Thanks Bren. The below Regex is working for only few inputs.

 

Can you help with the attached file.

CoG
14 - Magnetar

Here is an alternative that takes into account all provided cases: 

.*,\s?(.*?$)|(^.*$)

Screenshot.png

The Regex checks for the last occurrence of a comma and captures all remaining text, or, if no comma exists, it just takes everything.

 

Hope this helps and Happy Solving!

Labels
Top Solution Authors