I have a string in PostgreSQL 11:
'for values from ('2022-01-01') to ('2023-01-01')'
And I need to extract all values between brackets:
expected result: '2022-01-01', '2023-01-01'
If I use the following construction, I'm able to extract only the first value:
select substring('FOR VALUES FROM (''2020-01-01'') TO (''2021-01-01'')' from '\((.*?)\)');
Is it possible to extract the second value? Or both values as one array?