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 C99D39FB35B for ; Tue, 5 Sep 2006 12:24:06 -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 27676-01-9 for ; Tue, 5 Sep 2006 12:23:42 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id E75789FB374 for ; Tue, 5 Sep 2006 12:22:56 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k85FMsEi025030; Tue, 5 Sep 2006 11:22:54 -0400 (EDT) To: mario.splivalo@mobart.hr cc: pgsql-sql@postgresql.org Subject: Re: Postgres regexp matching failure? In-reply-to: <1157465870.27799.39.camel@localhost.localdomain> References: <1157451491.27799.6.camel@localhost.localdomain> <1157465870.27799.39.camel@localhost.localdomain> Comments: In-reply-to Mario Splivalo message dated "Tue, 05 Sep 2006 16:17:50 +0200" Date: Tue, 05 Sep 2006 11:22:54 -0400 Message-ID: <25029.1157469774@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.116 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/28 X-Sequence-Number: 26239 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. 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. regards, tom lane