Sender: owner-postgres95@postgres.Berkeley.EDU
X-Return-Path: andrew_yu
Received: from methi.ndim.edrc.cmu.edu (METHI.NDIM.EDRC.CMU.EDU [128.2.214.230]) by nobozo.CS.Berkeley.EDU (8.6.10/8.6.3) with SMTP id OAA31902 for <postgres95@postgres.BERKELEY.EDU>; Tue, 7 Nov 1995 14:16:30 -0800
Message-Id: <199511072216.OAA31902@nobozo.CS.Berkeley.EDU>
Received: from localhost by methi.ndim.edrc.cmu.edu id aa07369;
          7 Nov 95 17:16 EST
X-Mailer: exmh version 1.6.2 7/18/95
To: "Bryon S. Lape" <blape@utk.edu>, postgres95@postgres.Berkeley.EDU
Reply-to: rp2y+@CS.cmu.edu
Subject: Re: (fwd) 
References: <9511072122.AA09981@aztec.lib.utk.edu> 
In-reply-to: Your message of "Tue, 07 Nov 1995 16:24:07 EST."
             <9511072122.AA09981@aztec.lib.utk.edu> 
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Tue, 07 Nov 1995 17:16:06 -0500
From: Robert Patrick <Robert_Patrick@methi.ndim.edrc.cmu.edu>
Resent-To: postgres95-redist
Resent-Date: Tue, 07 Nov 95 14:16:31 -0800
Resent-From: pglite
Resent-XMts: smtp

> >
> > SELECT * 
> >   FROM foo 
> >  WHERE foo.bar ~ '.*[^a-zA-Z1-9]user_word[^a-zA-Z1-9].*'
> >     OR foo.bar ~ 'user_word[^a-zA-Z1-9].*'
> >     OR foo.bar ~ '.*[^a-zA-Z1-9]user_word'
> 
>         I tried the using the OR's and it returned too much.  Using the
> first line of reg exp does seem to work though.

Dang it, I did it again...

SELECT * 
  FROM foo 
 WHERE foo.bar ~ '.*[^a-zA-Z1-9]user_word[^a-zA-Z1-9].*'
    OR foo.bar ~ '^user_word[^a-zA-Z1-9].*'
    OR foo.bar ~ '.*[^a-zA-Z1-9]user_word$'

Sorry, Robert



===============================================================================
  To unsubscribe from the Postgres95 mailing list, send mail with the subject
  line "DEL" to "postgres95-request@postgres.Berkeley.EDU". 
============  URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres95/  ===========
