pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Emils Klotins <emils@grafton.lv>
To: Vladimir Terziev <vlady@rila.bg>
Cc: pgsql-sql@postgresql.org
Subject: Re: Regexps -- too complex?
Date: Thu, 26 Apr 2001 15:31:02 +0200
Message-ID: <3AE83F36.3905.F1E2D6D@localhost> (raw)
In-Reply-To: <200104261151.OAA02774@star.rila.bg>
References: <3AE81A7B.2506.E8EB40C@localhost>

> 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



view thread (3+ messages)  latest in thread

Message-ID: <3AE83F36.3905.F1E2D6D@localhost>
Permalink:  ../3AE83F36.3905.F1E2D6D@localhost/
Also on:    postgresql.org/message-id/3AE83F36.3905.F1E2D6D@localhost

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: emils@grafton.lv, vlady@rila.bg
  Subject: Re: Regexps -- too complex?
  In-Reply-To: <3AE83F36.3905.F1E2D6D@localhost>
  References: <3AE81A7B.2506.E8EB40C@localhost> <3AE83F36.3905.F1E2D6D@localhost>

* 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