Re: Help on phrasee matching in WHERE (colum~*'.*ab*.')

From: "Rob Arnold" <rob(at)cabrion(dot)com>
To: "Gabor Szilagyi" <Gabor(dot)Szilagyi(at)nyo(dot)unep(dot)org>, <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Help on phrasee matching in WHERE (colum~*'.*ab*.')
Date: 2001-03-13 02:25:32
Message-ID: 005101c0ab64$e375c780$4200fd0a@home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

It's acting correctly. The * means match 0 or more b's

Rewrite it as '.*nb+' the + means match one or more times.

--rob

----- Original Message -----
From: "Gabor Szilagyi" <Gabor(dot)Szilagyi(at)nyo(dot)unep(dot)org>
To: <pgsql-novice(at)postgresql(dot)org>
Sent: Thursday, March 08, 2001 2:15 PM
Subject: Help on phrasee matching in WHERE (colum~*'.*ab*.')

> Hi,
>
> I am running PostgreSQL 7.0.3 on a Linux 2.4.0 using PHP4 (that is might
> not relevant here).
>
> What I am running into is this.
>
> I am trying to pick out rows from the database which contains a
> particular string.
>
> I am using the following
>
> SELECT * FROM in_table WHERE n_from ~* '.*nb*.
>
> (Well actually a bunch of this condition is AND/OR -ed together)
>
> My trouble is this: If I enter only a two character string as above,
> it will not only matches string containing "nb" but all those which
> contains the letter "n".
>
> I tried this even with pgaccess directly !!! Same thing, is this a bug?
>
> It is _very_ important for met to be able to match words containing
> same strings including the two character variety ...
>
> The above behaivour is just doesn't cut it..
>
> Any suggestion would be welcomed
>
> Gabor Szilagyi
> szilagyi(at)nyo(dot)unep(dot)org
>
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Oliver Elphick 2001-03-13 05:37:18 Re: Help on phrasee matching in WHERE (colum~*'.*ab*.')
Previous Message Rob Arnold 2001-03-13 02:20:27 Re: [SQL] Permissons on database