I have some text like the following:
between [... between (...)] and (...) as ...
with the regex
between\s+(.+?)\s+and\s+(.+?)\s+as
I am trying to capture what are inside two pairs of parentheses, i.e., the contents bounded by between and and. However I am stuck in that it always returns content in the square brackets and the second pair of parentheses.
EDIT:
for example if the text is:
between foo whatever between bar and dummy as
I want the regex to extract 'bar' and 'dummy', not 'foo whatever between bar' and 'dummy'
.*