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)
Here is an alternative that takes into account all provided cases:
.*,\s?(.*?$)|(^.*$)
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!
@pradnyaraibagkar - try this: .*\s(\w+\s\w+\s\(\w+\))
Thanks Bren. The below Regex is working for only few inputs.
Can you help with the attached file.