[SQL, regex, words] how to match word boundaries using regex's?

From: Tony(dot)Curtis(at)vcpc(dot)univie(dot)ac(dot)at
To: pgsql-sql(at)postgresql(dot)org
Subject: [SQL, regex, words] how to match word boundaries using regex's?
Date: 1998-10-19 13:02:32
Message-ID: 199810191302.PAA05430@haze.vcpc.univie.ac.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I have been searching all the mailing lists, the on-line
docs, and the source! but cannot find an answer/solution to
this:

I have a varchar() field containing descriptions of things
(doesn't matter what they are).

I want to do a regex match limited to words.

I tried this:

where ... ~ '\Wword\W';
where ... ~ '\W*word\W*';
where ... ~ '\b\(word\)\b';

and other things with LIKE but no joy.

How can I do this?

thanks
tony

Browse pgsql-sql by date

  From Date Subject
Next Message Paul Friberg CEO - ISTI 1998-10-19 13:03:39 PostgreSQL COPY command
Previous Message Ulf Mehlig 1998-10-19 07:39:47 `statistical' aggregate functions etc.