Re: Regexps -- too complex?

Поиск
Список
Период
Сортировка
Искать
От
Emils Klotins
Тема
Re: Regexps -- too complex?
Дата
Msg-id
3AE83F36.3905.F1E2D6D@localhost
Список
Дерево обсуждения
Regexps -- too complex? "Emils Klotins" <emils@grafton.lv>
Re: Regexps -- too complex? Tom Lane <tgl@sss.pgh.pa.us>
> 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

В списке pgsql-sql по дате отправления
От: Wei Weng
Дата:
Сообщение: simulate union in subselect
От: chris Günther
Дата:
FAQ