Search Postgresql Archives

Re: How to use like with a list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/18/11 12:18 PM, Richard Broersma wrote:
On Fri, Nov 18, 2011 at 12:13 PM, John R Pierce<pierce@xxxxxxxxxxxx>  wrote:

>  where field ~ '^(jo|mo|do|fo)'
Don't forget to add the l as the end:

where field ~ '^(jo|mo|do|fo)l'

ah, yeah, that.

and to complete the original requirement...

where field ~ '^(' || replace(?, ',', '|') || ')l'


btw, no need for a .* on the end, since the regex isn't anchored at the end with a $


--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux