matching against a list of regexp?

Started by Gauthier, Daveover 14 years ago2 messagesgeneral
Jump to latest
#1Gauthier, Dave
dave.gauthier@intel.com

Hi:

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$');

Does anyone know the right syntax for this?

Thanks!

#2Richard Broersma
richard.broersma@gmail.com
In reply to: Gauthier, Dave (#1)
Re: matching against a list of regexp?

On Thu, Oct 27, 2011 at 9:18 AM, Gauthier, Dave <dave.gauthier@intel.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.