Using functions in regexp replace captures

From: Tim Uckun <timuckun(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Using functions in regexp replace captures
Date: 2021-08-05 04:53:38
Message-ID: CAGuHJrOFcd78vef=zwTZ9yDbFw6exk_Y-phts2drsgZbRwe7Pw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I want to do something like this

SELECT REGEXP_REPLACE('some_string','(.*)
(.*)',some_function_that_returns_string('\2',' \1'));

Is this possible at all?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2021-08-05 05:19:28 Re: Using functions in regexp replace captures
Previous Message Vijaykumar Jain 2021-08-04 17:50:09 Re: Unexpected block ID found when reading data