У меня есть эта строка "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']