Re: regexp_replace not respecting greediness

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Simon Ellmann <simon(dot)ellmann(at)tum(dot)de>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: regexp_replace not respecting greediness
Date: 2025-09-19 14:09:43
Message-ID: CAKFQuwYVm=NX1oo6kHUn3EdGuXJphq89EmjgeaCJDk_dpRjUew@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Friday, September 19, 2025, Simon Ellmann <simon(dot)ellmann(at)tum(dot)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:

https://www.postgresql.org/docs/current/functions-matching.html#POSIX-MATCHING-RULES

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-09-19 16:01:53 Re: regexp_replace not respecting greediness
Previous Message Simon Ellmann 2025-09-19 12:36:20 regexp_replace not respecting greediness