hi everyone,

i am trying to write postgresql query for below scenario:

inputs :
1. alphanumeric string e.g. abcd1234efgh
2. pattern e.g. [1][2][3][2][1][3]
3. delimiter e.g - (hyphen)

output : a-bc-d12-34-e-fgh

i require query. function wont work for me.

any help is welcome.

thanks