I am trying to write a PostgreSQL query for below scenario:
Input:
I) alphanumeric string, e.g. abcd1234efgh
II) pattern, e.g. [1][2][3][2][1][3]
III) delimiter, e.g -
(hyphen)
Output:
a-bc-d12-34-e-fgh
I require a query. Function won't work for me.