Re: regexp_replace not respecting greediness - Mailing list pgsql-bugs

From Simon Ellmann
Subject Re: regexp_replace not respecting greediness
Date
Msg-id 0686ED8B-5A35-42E1-AF6A-DD1FD8C8C0F0@tum.de
Whole thread Raw
In response to Re: regexp_replace not respecting greediness  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
Thanks for the hint to the documentation, I missed that part. This is really surprising behavior!

Cheers,
Simon

--

Research associate
Chair for database systems
Department of Informatics
TU München  Tel: +49 89 289 17276
Boltzmannstr. 3  E-Mail: simon.ellmann@tum.de
D-85748 Garching bei München, Germany

On 19. Sep 2025, at 16:09, David G. Johnston <david.g.johnston@gmail.com> wrote:

On Friday, September 19, 2025, Simon Ellmann <simon.ellmann@tum.de> wrote:
With the following regular expression, the second .* seems to match non-greedily although (if I am correct) it should match greedily:

Working as documented in rule 6:


David J.


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: coredump of language internal function
Next
From: Amit Kapila
Date:
Subject: Re: Lock timeouts and unusual spikes in replication lag with logical parallel transaction streaming