我有一个字符串s
包含: -
Hello {full_name} this is my special address named {address1}_{address2}.
我正在尝试匹配大括号中包含的所有字符串实例。
尝试:-
matches = re.findall(r'{.*}', s)
给我
['{full_name}', '{address1}_{address2}']
但我实际上想要检索的是
['{full_name}', '{address1}', '{address2}']
我怎样才能做到这一点?