From: | Hervé Piedvache <herve(at)elma(dot)fr> |
---|---|
To: | Holger Klawitter <lists(at)klawitter(dot)de> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Regular expressions or LIKE ? HELP needed ! |
Date: | 2002-08-02 17:55:43 |
Message-ID: | 3D4AC79F.F198AABB@elma.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)elma(dot)fr
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Elphick | 2002-08-02 17:59:43 | Re: Convert number of month to name of month |
Previous Message | Andrew Sullivan | 2002-08-02 17:52:27 | Re: ERROR: Can't Parse "" (PG and PHP on Linux) |