I need to fetch text between parenthesis {
text }
in python.
here is my sample string,
my_txt = "/home/admin/test_dir/SAM_8860-fg_frame_{001,002,003,004,005,007}.png"
I need numbers between {}.
I tried,
>>> re.search(r'{.*}',my_txt).group()
'{001,002,003,004,005,007}'
but it returns string along with curly braces.
expected output is, '001,002,003,004,005,007'
how to omit curly braces to fetch string in python regex?