Re: Regular expressions or LIKE ? HELP needed !

Поиск
Список
Период
Сортировка
От Hervé Piedvache
Тема Re: Regular expressions or LIKE ? HELP needed !
Дата
Msg-id 3D4AC79F.F198AABB@elma.fr
обсуждение исходный текст
Ответ на Regular expressions or LIKE ? HELP needed !  (Hervé Piedvache <herve@elma.fr>)
Список pgsql-general
Hi Holger,

Holger Klawitter a écrit :
>
> > 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).

OK thanks !

> > 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?

ilike yes loose something in copy/paste ;)

I'm using 7.2.1 ... and it's running ... I find the mistake ... the data
are escaped in the database so I have to do :

select name from block where code ilike '%lower(\\\\''%';

regards,
--
Hervé Piedvache

Elma Ingenierie Informatique
6, rue du Faubourg Saint-Honoré
F-75008 - Paris - France
http://www.elma.fr
Tel: +33-1-44949901
Fax: +33-1-44949902
Email: herve@elma.fr

В списке pgsql-general по дате отправления:

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Re: Convert number of month to name of month
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: MySQL or Postgres ?