我有这个字符串"this ${is} a sample ${text}"
我想要一个用$ {}
我尝试了这个,并且奏效了
re.findall("{(.*?)}", "this ${is} a sample ${text}")
['is', 'text']
However, I would like to narrow down the search by using the $ symbol too.
The following command return []
re.findall("${(.*?)}", "this ${is} a sample ${text}")
re.findall("${(.*?)}", "this ${is} a sample ${text}")
The expected output should be ['is', 'text']