From: | Mario Splivalo <mario(dot)splivalo(at)mobart(dot)hr> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Postgres regexp matching failure? |
Date: | 2006-09-05 14:17:50 |
Message-ID: | 1157465870.27799.39.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Tue, 2006-09-05 at 08:42 -0500, Aaron Bono wrote:
> On 9/5/06, Mario Splivalo <mario(dot)splivalo(at)mobart(dot)hr> wrote:
>
> pulitzer2=# select 'stop works' ~ '^\s*(?:[\
> +|-]|(?:[sS][tT][oO][pP]\b)).*$';
> ?column?
> ----------
> f
> (1 row)
>
> Here, postgres should return true, but it gives me false.
>
>
> \b is a back-space - is that what you are wanting there? If I remove
> it I get true.
Actually, I'm not sure :) As I've mentioned, python/java/perl do as I
expected, postgres on the other hand doesn't. If \b was the backspace,
then I'd have trouble with '+mario test', and that one seems to be OK.
I also tried doublebackslashing, all the same.
So, I guess it's obvious that postgres doesn't treat regular expressions
the same way as java/perl/pyton/php/awk/sed do...
Mario
--
Mario Splivalo
Mob-Art
mario(dot)splivalo(at)mobart(dot)hr
"I can do it quick, I can do it cheap, I can do it well. Pick any two."
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2006-09-05 14:21:15 | Re: Postgres regexp matching failure? |
Previous Message | Mario Splivalo | 2006-09-05 14:16:35 | Re: Postgres regexp matching failure? |