From: Tom Lane <tgl@sss.pgh.pa.us>
To: atoriwork@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8605: Regular expression lazy quantification issue
Date: Tue, 19 Nov 2013 12:52:11 -0500
Message-ID: <12547.1384883531@sss.pgh.pa.us> (raw)
In-Reply-To: <E1ViizF-0004K5-5f@wrigleys.postgresql.org>
References: <E1ViizF-0004K5-5f@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
atoriwork@gmail.com writes:
> Lazy quantificators does't work after "or" block in regexp mask
> ('(a)|(b)'):
This isn't a bug, it's documented behavior. See
http://www.postgresql.org/docs/9.2/static/functions-matching.html#POSIX-MATCHING-RULES
specifically the bit that an RE containing an | operator is always greedy.
The non-greedy operators within it are constrained to match as little
as possible, but that happens after determining the overall match, which
will be greedy.
I realize that this might not be the behavior you'd like, but we're
unlikely to change it.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: tgl@sss.pgh.pa.us, atoriwork@gmail.com
Subject: Re: BUG #8605: Regular expression lazy quantification issue
In-Reply-To: <12547.1384883531@sss.pgh.pa.us>
References: <E1ViizF-0004K5-5f@wrigleys.postgresql.org> <12547.1384883531@sss.pgh.pa.us>
* 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