Re: matching against a list of regexp?

From: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
To: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: matching against a list of regexp?
Date: 2011-10-27 16:21:31
Message-ID: CABvLTWFpWVjSkQYagj3fjxHqbV2EVY7tw=7DFoBcqpA3ixWonQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Oct 27, 2011 at 9:18 AM, Gauthier, Dave <dave(dot)gauthier(at)intel(dot)com> wrote:
> I need to be able to select all records with a col value that matches any of
> a list of regexp.  Sort of like...
>
> select a,b,c from foo where d ~ ('^xyz','blah','shrug$');

WHERE d ~ '^xyz|blah|shrug$'

--
Regards,
Richard Broersma Jr.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Venkat Balaji 2011-10-27 16:23:47 Re: Are pg_xlog/* fiels necessary for PITR?
Previous Message Gauthier, Dave 2011-10-27 16:18:01 matching against a list of regexp?