Regular expressions or LIKE ? HELP needed !

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

I have a little trouble ... my level with regular expression is not at
the top ... but I found two troubles and may I do not use them well ...
may be it's another things not detailed in any documentation of
PostgreSQL ...

Case 1 :
select name block where code ~* 'lower(';
ERROR:  Invalid regular expression: parentheses ( ) not balanced

select name block where code ~* 'lower\(';
ERROR:  Invalid regular expression: parentheses ( ) not balanced

How to escape a "(" ??

Case 2 :
select name from block where code ilike '%lower(%';
This is running ... ;)

But I want to find a text inside my field code having : lower(' inside
with the quote ("'") code at the end ... ok ?

So I thought I have to double the quote like this ... I have no result
... but I know result exists !
select name from block where code ike '%lower(''%';

I have also tried :
select name from block where code ike '%lower(\'%';
Same thing ... no result ... but I'm sure I have some !

Any idea how to escape the quote caracter in a LIKE ?

Many thanks for you help !

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 по дате отправления:

Предыдущее
От: Karel Zak
Дата:
Сообщение: Re: to_char(0,'FM990D99') = "0." instead of "0"
Следующее
От: Holger Klawitter
Дата:
Сообщение: Re: Regular expressions or LIKE ? HELP needed !