On Monday, June 21, 2021, Oliver Kohll <oli...@agilechilli.com> wrote:

>
> select regexp_replace(
> 'here is [[my text]] to replace and [[some more]]',
> E'\\[\\[(.*?)\\]\\]',
> replace(E'\\1', ' ', '_'),
> 'g'
> );
>

Side note, you seldom want to use ā€œEā€ (escape) string literals with regexes
(or in general really) using just the simple literal syntax removes the
need for double-backslashing.

David J.

Reply via email to