Received: from haze.vcpc.univie.ac.at (haze.vcpc.univie.ac.at [131.130.186.138]) by hub.org (8.8.8/8.8.8) with ESMTP id JAA01432 for ; Mon, 19 Oct 1998 09:02:54 -0400 (EDT) (envelope-from tc@vcpc.univie.ac.at) Received: (from smtpd@localhost) by haze.vcpc.univie.ac.at (8.8.8/8.8.8) id PAA05430 for ; Mon, 19 Oct 1998 15:02:49 +0200 (MET DST) Message-Id: <199810191302.PAA05430@haze.vcpc.univie.ac.at> Received: from salome(131.130.186.145), claiming to be "vcpc.univie.ac.at" via SMTP by haze, id smtpdAAAa001Kn; Mon Oct 19 15:02:32 1998 To: pgsql-sql@postgresql.org Subject: [SQL, regex, words] how to match word boundaries using regex's? X-Attribution: tony From: Tony.Curtis@vcpc.univie.ac.at Date: Mon, 19 Oct 1998 15:02:32 +0200 Sender: tc@vcpc.univie.ac.at 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