Re: Regular expressions or LIKE ? HELP needed !
От | Jeff Eckermann |
---|---|
Тема | Re: Regular expressions or LIKE ? HELP needed ! |
Дата | |
Msg-id | 20020801132232.53848.qmail@web20810.mail.yahoo.com обсуждение исходный текст |
Ответ на | Re: Regular expressions or LIKE ? HELP needed ! (Holger Klawitter <lists@klawitter.de>) |
Ответы |
Re: Regular expressions or LIKE ? HELP needed !
|
Список | pgsql-general |
A safe method that always works is simply to use a character class, like: select name block where code ~* 'lower [(]' --- Holger Klawitter <lists@klawitter.de> wrote: > > > How to escape a "(" ?? > > select name block where code ~* 'lower\\('; > > First, you have to escape the '(' in order to make > regexps match the bracket > instead of using it as a grouping operator. > > And then you have to escape the escape in order to > get it passed to the regexp > system (at least with psql). > > > select name from block where code ike > '%lower(''%'; > > Works for me in 7.2.1 (ike should be ilike). Which > postgres version are you > running? > > With kind regards / mit freundlichem Gru� > Holger Klawitter > -- > Holger Klawitter > http://www.klawitter.de > lists@klawitter.de > > ---------------------------(end of > broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please > send an appropriate > subscribe-nomail command to majordomo@postgresql.org > so that your > message can get through to the mailing list cleanly __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com
В списке pgsql-general по дате отправления: