Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VipTG-0007PS-9v for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Nov 2013 17:52:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VipTF-0003rX-Ow for pgsql-bugs@arkaria.postgresql.org; Tue, 19 Nov 2013 17:52:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VipTE-0003q7-9w for pgsql-bugs@postgresql.org; Tue, 19 Nov 2013 17:52:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VipTB-0004wW-8N for pgsql-bugs@postgresql.org; Tue, 19 Nov 2013 17:52:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id rAJHqBNL012548; Tue, 19 Nov 2013 12:52:11 -0500 From: Tom Lane To: atoriwork@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8605: Regular expression lazy quantification issue In-reply-to: References: Comments: In-reply-to atoriwork@gmail.com message dated "Tue, 19 Nov 2013 10:56:53 +0000" Date: Tue, 19 Nov 2013 12:52:11 -0500 Message-ID: <12547.1384883531@sss.pgh.pa.us> X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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