I know how to capture a single instance of a substring between two markers:
Python 3 How to get string between two points using regex?
I tested that approach out with this string:
text = 'blah.blah${capture1}.${capture2}' I wanted to get all the substrings between these markers '${' and '}', but it only gets the first one.
>>> text = 'blah.blah${capture1}.${capture2}' >>> found = re.search('\$\{(.+?)\}', text) >>> found.groups() ('capture1',) >>> len(found.groups()) 1 >>> How do I get all of them?