I need help from some Regex Guru's. I have been struggling on this one for a little while and can't get it working as intended.
This is my regex patter at the moment - it get everything between ',' and ')'
df['regex_2'] = df['name'].str.extract(r'\,(.*?)\)')
Text 123 (SDC, XUJ)
Text BCD (AUD)
Text 123 (AUD, XTJ)
Text BCSS (AUD,TACT,HGI7649AU)
` XUJ`
``
` XTJ`
`TACT,HGI7649AU`
However, what I need is all characters after the last comma before the bracket. Please see examples below.
Text 123 (SDC, XUJ)
Text BCD (AUD)
Text 123 (AUD, XTJ)
Text BCSS (AUD,TACT,HGI7649AU)
`XUJ`
``
`XTJ`
`HGI7649AU`