pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: mario.splivalo@mobart.hr
Cc: pgsql-sql@postgresql.org
Subject: Re: Postgres regexp matching failure?
Date: Tue, 05 Sep 2006 11:22:54 -0400
Message-ID: <25029.1157469774@sss.pgh.pa.us> (raw)
In-Reply-To: <1157465870.27799.39.camel@localhost.localdomain>
References: <1157451491.27799.6.camel@localhost.localdomain>
	<bf05e51c0609050642p590b8a7euc581ffd52119e4ce@mail.gmail.com>
	<1157465870.27799.39.camel@localhost.localdomain>

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.

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



view thread (11+ messages)  latest in thread

Message-ID: <25029.1157469774@sss.pgh.pa.us>
Permalink:  ../25029.1157469774@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25029.1157469774@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mario.splivalo@mobart.hr
  Subject: Re: Postgres regexp matching failure?
  In-Reply-To: <25029.1157469774@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox