[SQL, regex, words] how to match word boundaries using regex's? - Mailing list pgsql-sql

From Tony.Curtis@vcpc.univie.ac.at
Subject [SQL, regex, words] how to match word boundaries using regex's?
Date
Msg-id 199810191302.PAA05430@haze.vcpc.univie.ac.at
Whole thread Raw
Responses Re: [SQL] [SQL, regex, words] how to match word boundaries using regex's?
List 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

pgsql-sql by date:

Previous
From: Ulf Mehlig
Date:
Subject: `statistical' aggregate functions etc.
Next
From: "Gene Selkov Jr."
Date:
Subject: Re: [SQL] [SQL, regex, words] how to match word boundaries using regex's?