agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Paul M. Aoki <aoki@CS.Berkeley.EDU>
To: matthew@interaccess.com
Cc: postgres-arch@postgres.Berkeley.EDU
Subject: Re: trouble with "like" clause
Date: Thu, 06 Jul 95 12:11:08 -0700
Message-ID: <199507061911.MAA02590@faerie.CS.Berkeley.EDU> (raw)
In-Reply-To: <199506281454.JAA14396@flowbee.interaccess.com>
"matthew@risetime.com" <matthew@interaccess.com> writes:
> I want to be able to do a substring case-insensitive search on a
> text field.
>
> So far I have:
> SELECT * from Movies WHERE MovieName ~ "[Bb][Aa][Tt]*"
>
> Which will make macthes with "Batman Forever". If I instead enter in
> "Forever" I should also make a matche, however, change the where clause to
> "*[Ff][Oo][Rr][Ee][Vv][Ee][Rr]" failes to find a match.
it's a c regular expression, not a shell pattern, so just
"[Ff][Oo][Rr][Ee][Vv][Ee][Rr]"
should work. that, or
".*[Ff][Oo][Rr][Ee][Vv][Ee][Rr]"
--
Paul M. Aoki | University of California at Berkeley
aoki@CS.Berkeley.EDU | Dept. of EECS, Computer Science Division (#1776)
| Berkeley, CA 94720-1776
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: postgres@postgres.berkeley.edu
Cc: aoki@CS.Berkeley.EDU, matthew@interaccess.com, postgres-arch@postgres.Berkeley.EDU
Subject: Re: trouble with "like" clause
In-Reply-To: <199507061911.MAA02590@faerie.CS.Berkeley.EDU>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox