X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id AA4D29FB224 for ; Tue, 5 Sep 2006 10:44:01 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 74724-04-4 for ; Tue, 5 Sep 2006 13:43:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by postgresql.org (Postfix) with ESMTP id 4470E9FB369 for ; Tue, 5 Sep 2006 10:42:40 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id d80so3125567pyd for ; Tue, 05 Sep 2006 06:42:38 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=cjivEVyE/5lN9cAmmHaFDNGfEq3LjNQc1yq3Sv9nlEQjCqAATh5atmeQfOrLYHT0O7vuRh3P7XG3sg3rdi9w8s6Kt+jOs/xF+gOmuZNXaquMFtWvOhnT0GIxZNJWfM35WsHVVy7mY/WLK7FQPD2WWAw7l/PqizUdeG/Vtv2wb2o= Received: by 10.35.111.14 with SMTP id o14mr12483182pym; Tue, 05 Sep 2006 06:42:38 -0700 (PDT) Received: by 10.35.80.9 with HTTP; Tue, 5 Sep 2006 06:42:38 -0700 (PDT) Message-ID: Date: Tue, 5 Sep 2006 08:42:38 -0500 From: "Aaron Bono" To: mario.splivalo@mobart.hr Subject: Re: Postgres regexp matching failure? Cc: pgsql-sql@postgresql.org In-Reply-To: <1157451491.27799.6.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_54401_8935406.1157463758541" References: <1157451491.27799.6.camel@localhost.localdomain> X-Google-Sender-Auth: d334b2637739f936 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.696 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, HTML_40_50, HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/20 X-Sequence-Number: 26231 ------=_Part_54401_8935406.1157463758541 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 9/5/06, Mario Splivalo wrote: > > > pulitzer2=# select 'stop works' ~ '^\s*(?:[\ > +|-]|(?:[sS][tT][oO][pP]\b)).*$'; > ?column? > ---------- > f > (1 row) > > Here, postgres should return true, but it gives me false. \b is a back-space - is that what you are wanting there? If I remove it I get true. ================================================================== Aaron Bono Aranya Software Technologies, Inc. http://www.aranya.com http://codeelixir.com ================================================================== ------=_Part_54401_8935406.1157463758541 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 9/5/06, Mario Splivalo <mario.splivalo@mobart.hr> wrote:

pulitzer2=# select 'stop works' ~ '^\s*(?:[\
+|-]|(?:[sS][tT][oO][pP]\b)).*$';
?column?
----------
f
(1 row)

Here, postgres should return true, but it gives me false.

 
\b is a back-space - is that what you are wanting there?  If I remove it I get true.

==================================================================
   Aaron Bono
   Aranya Software Technologies, Inc.
   http://www.aranya.com
   http://codeelixir.com
================================================================== ------=_Part_54401_8935406.1157463758541--