Re: Regexps -- too complex?

From: "Emils Klotins" <emils(at)grafton(dot)lv>
To: "Vladimir Terziev" <vlady(at)rila(dot)bg>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Regexps -- too complex?
Date: 2001-04-26 13:31:02
Message-ID: 3AE83F36.3905.F1E2D6D@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> SELECT id, title,publishdate,categoryid FROM articles WHERE
> upper(title) ~ '(BLACK|SERIOUS|SAM)[[:>:]]'::text ;
>
> I think the proiblem is in trnsalte, not in regexp
>
> If you have installed apprporiate character encoding in Postgres,
> 'upper' will work!
>
> Vladimir

Thanks for the advice, unfortunately, it does not seem to work that
way.

CREATE TABLE "test" (
"title" text
);
COPY "test" FROM stdin;
Serious Sam ceïâ pie pircçjiem
Black & White gaidîðanas svçtki
Lorgaine: The Black Standard - íeltu varoòeposs
Lorgaine: The Black Standard beta versija
Black&White tomçr neesot spiegu programma
Black & White FAQ
Black & White "ïaunais" FAQ
Black & White - pârdotâkâ spçle ASV
\.

SELECT title FROM test WHERE title ~ '(BLACK|WHITE|SAM)';

yields 8 rows.

SELECT title FROM test WHERE title ~
'(BLACK|WHITE|blahblah|SAM)';

yields 0 rows!

SELECT title FROM test WHERE title ~ '(BLACK|WHITE|SAM) *';
also yields 0 rows!

I dont think this is right no matter what the characters I am using
there. At least it shouldn't, should it?

Emils

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Martín Marqués 2001-04-26 13:50:35 Re: use of arrow keys to traverse history
Previous Message Emils Klotins 2001-04-26 10:54:19 Regexps -- too complex?