Received: from home.grafton.lv (home.grafton.lv [159.148.106.93]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3QCTa308719 for ; Thu, 26 Apr 2001 08:29:36 -0400 (EDT) (envelope-from emils@grafton.lv) Received: from mortyr (mortyr.grafton.lv [159.148.106.65]) by home.grafton.lv (8.9.3/8.8.7) with ESMTP id PAA21918; Thu, 26 Apr 2001 15:29:31 +0300 From: "Emils Klotins" Organization: Grafton Entertainment To: "Vladimir Terziev" Date: Thu, 26 Apr 2001 15:31:02 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Subject: Re: Regexps -- too complex? CC: pgsql-sql@postgresql.org Message-ID: <3AE83F36.3905.F1E2D6D@localhost> In-reply-to: <200104261151.OAA02774@star.rila.bg> References: Your message of "Thu, 26 Apr 2001 12:54:19 +0200." <3AE81A7B.2506.E8EB40C@localhost> X-mailer: Pegasus Mail for Win32 (v3.12c) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from Quoted-printable to 8bit by postgresql.org id f3QCTa308725 X-Archive-Number: 200104/401 X-Sequence-Number: 2761 > 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