Re: Postgres regexp matching failure? - Mailing list pgsql-sql

From Mario Splivalo
Subject Re: Postgres regexp matching failure?
Date
Msg-id 1157625135.3209.9.camel@localhost.localdomain
Whole thread Raw
In response to Re: Postgres regexp matching failure?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
On Tue, 2006-09-05 at 11:22 -0400, Tom Lane wrote:
> Mario Splivalo <mario.splivalo@mobart.hr> 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."




pgsql-sql by date:

Previous
From: Kaloyan Iliev
Date:
Subject: Re: Substitute a Character
Next
From: Emi Lu
Date:
Subject: Is it possible to left join based on previous joins result