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 9D0899FB284 for ; Thu, 7 Sep 2006 07:32:30 -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 43643-03 for ; Thu, 7 Sep 2006 07:32:23 -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 163119FB26B for ; Thu, 7 Sep 2006 07:32:22 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by pjetlic.mobart.hr (Postfix) with ESMTP id 3BD5417A27; Thu, 7 Sep 2006 12:32:18 +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 03996-02-10; Thu, 7 Sep 2006 12:32:16 +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 4109517A24; Thu, 7 Sep 2006 12:32:16 +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: <25029.1157469774@sss.pgh.pa.us> References: <1157451491.27799.6.camel@localhost.localdomain> <1157465870.27799.39.camel@localhost.localdomain> <25029.1157469774@sss.pgh.pa.us> Content-Type: text/plain Organization: Mob-Art Date: Thu, 07 Sep 2006 12:32:15 +0200 Message-Id: <1157625135.3209.9.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.184 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/46 X-Sequence-Number: 26257 On Tue, 2006-09-05 at 11:22 -0400, Tom Lane wrote: > Mario Splivalo writes: > > So, I guess it's obvious that postgres doesn't treat regular expressions > > the same way as java/perl/pyton/php/awk/sed do... > > When you get into stuff as arcane as word-boundary constraints, you'll > find that regexes are not NEARLY as well standardized as that flippant > complaint suggests. For penance, actually try it in all six of those > languages and report back. So I did, and I was mistaken the first time. Java, perl, python and php treat regexpes differently than awk/sed and differently than tcl. I can post source snippets and results here if anyone is interested in those. > Postgres' regexp code is the same as Tcl's (it's Henry Spencer's package) > and if you check TFM you will find out that \y, or possibly \M, is what > you want. Thnx, I missed that part that 'postgres has same regexp code as Tcl'. Mike -- 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."