X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0422A9DCA1B for ; Sun, 8 Jan 2006 21:23:55 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 29387-04 for ; Sun, 8 Jan 2006 21:23:57 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 5CEC09DC836 for ; Sun, 8 Jan 2006 21:23:52 -0400 (AST) Received: from ls405.htnet.hr (ls405.htnet.hr [195.29.150.97]) by svr4.postgresql.org (Postfix) with ESMTP id 93A225AF026 for ; Mon, 9 Jan 2006 01:23:56 +0000 (GMT) Received: from ls401.t-com.hr (ls401.t-com.hr [195.29.150.236]) by ls405.htnet.hr (0.0.0/8.12.10) with ESMTP id k091NkSn014663 for ; Mon, 9 Jan 2006 02:23:46 +0100 Received: from ls401.t-com.hr (localhost.localdomain [127.0.0.1]) by ls401.t-com.hr (Qmlai) with ESMTP id 7975370004 for ; Mon, 9 Jan 2006 02:23:46 +0100 (CET) X-Envelope-Sender: mario.splivalo@mobart.hr Received: from 83-131-94-222.adsl.net.t-com.hr (83-131-94-222.adsl.net.t-com.hr [83.131.94.222]) by ls401.t-com.hr (Qmlai) with ESMTP id 45734A8002 for ; Mon, 9 Jan 2006 02:23:46 +0100 (CET) Subject: Re: Regular Expression Matching problem... From: Mario Splivalo Reply-To: mario.splivalo@mobart.hr To: pgsql-sql@postgresql.org In-Reply-To: <20060104170031.GB18628@winnie.fuhr.org> References: <1136383726.8868.27.camel@localhost.localdomain> <20060104145030.GG3490@webserv.wug-glas.de> <20060104170031.GB18628@winnie.fuhr.org> Content-Type: text/plain Organization: Mob-Art Date: Mon, 09 Jan 2006 02:22:49 +0100 Message-Id: <1136769769.19539.2.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200601/34 X-Sequence-Number: 23823 On Wed, 2006-01-04 at 10:00 -0700, Michael Fuhr wrote: > What Andreas is saying is that the patterns in the table have too > many backslashes. The original query was > > test=> select '+385911234567' ~ '^\\+38591\\d{7}$'; > ?column? > ---------- > t > (1 row) > > but if you select just the pattern you get > > test=> select '^\\+38591\\d{7}$'; > ?column? > ---------------- > ^\+38591\d{7}$ > (1 row) I was a bit silly here. Dunno why I tought I need to escape the backslashes when entering regexp as data in table. Thank you for pointing that out. Mike