Thanks much! I never even realised pg had regex built in.
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Thursday, October 12, 2000 2:50 PM
To: Michael Loftis
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] INSTR() like function?
"Michael Loftis" <taos@activesw.com> writes:
> IE are the characters A or B or C or D in the string "dogma" would be
> INSTR('ABCD','dogma');
See the regular-expression match operators (~ and ~*). The above would
be
select 'dogma'::text ~* '[ABCD]'::text;
assuming you meant you wanted case-insensitive match.
regards, tom lane