how to write a regular expression to match the below string :
name(abc1) or number(param9) or listget(12jtxgh)
I want to match the string enclosed in brackets only if it is prepended by name or number or listget.
I tried to this : r'((.*?))'
and if my expression looks like below :
(name(foo) & number(bar)) - listget(baz)
then it starts matching (name(foo) also. I want my regex to extract only foo, bar and baz from the above expression as it is appended by name, number, listget.
I have to write regex in this form only #r'regex'