From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: bgailer@gmail.com
Subject: BUG #15046: non-greedy ignored
Date: Sat, 03 Feb 2018 01:02:21 +0000
Message-ID: <151761974148.1240.12558693542380794378@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15046
Logged by: Bob Gailer
Email address: bgailer@gmail.com
PostgreSQL version: 10.1
Operating system: windows 10
Description:
I start psql; enter:
postgres=# select regexp_replace('a(d)s(e)f', '\(.*?\)', '', 'g');
regexp_replace
----------------
asf
(1 row)
Works as expected. Then I add |q to the pattern, and the .*? becomes
greedy!
postgres=# select regexp_replace('a(d)s(e)f', '\(.*?\)|q', '', 'g');
regexp_replace
----------------
af
(1 row)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, bgailer@gmail.com
Subject: Re: BUG #15046: non-greedy ignored
In-Reply-To: <151761974148.1240.12558693542380794378@wrigleys.postgresql.org>
References: <151761974148.1240.12558693542380794378@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox