X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 1E9039FB21D for ; Tue, 5 Sep 2006 11:17:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 19007-02-3 for ; Tue, 5 Sep 2006 11:16:59 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from pjetlic.mobart.hr (pjetlic.mobart.hr [80.80.51.10]) by postgresql.org (Postfix) with ESMTP id BE9189FB361 for ; Tue, 5 Sep 2006 11:16:44 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by pjetlic.mobart.hr (Postfix) with ESMTP id 8C56317A6F; Tue, 5 Sep 2006 16:16:42 +0200 (CEST) Received: from pjetlic.mobart.hr ([127.0.0.1]) by localhost (pjetlic [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 02127-04-16; Tue, 5 Sep 2006 16:16:36 +0200 (CEST) Received: from mike.mobart.hr (mike.mobart.hr [192.168.10.94]) (using SSLv3 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by pjetlic.mobart.hr (Postfix) with ESMTP id 1949217A39; Tue, 5 Sep 2006 16:16:36 +0200 (CEST) Subject: Re: Postgres regexp matching failure? From: Mario Splivalo Reply-To: mario.splivalo@mobart.hr To: Tom Lane Cc: pgsql-sql@postgresql.org In-Reply-To: <24281.1157465504@sss.pgh.pa.us> References: <1157451491.27799.6.camel@localhost.localdomain> <24281.1157465504@sss.pgh.pa.us> Content-Type: text/plain Organization: Mob-Art Date: Tue, 05 Sep 2006 16:16:35 +0200 Message-Id: <1157465795.27799.37.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by OpenSource AV+AS Mail Server X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.226 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/22 X-Sequence-Number: 26233 On Tue, 2006-09-05 at 10:11 -0400, Tom Lane wrote: > Mario Splivalo writes: > > Now, here is what happens if I try this in postgres: > > > pulitzer2=# select '+mario' ~ '^\s*(?:[\+|-]|(?:[sS][tT][oO][pP]\b)).*$'; > > I'm thinking you've forgotten to double your backslashes. > That was the first thing I tried :) What confused me was the difference I get when using python, or perl, or Java, or any other regexp 'matcher', therefore I asked for help here. Mario -- Mario Splivalo Mob-Art mario.splivalo@mobart.hr "I can do it quick, I can do it cheap, I can do it well. Pick any two."