Re: Referencing parts captured by round brackets in a regex in 8.4.13

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Referencing parts captured by round brackets in a regex in 8.4.13
Date: 2013-03-22 14:57:30
Message-ID: 514C715A.6020606@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 03/22/2013 08:53 AM, Alexander Farber wrote:
> Hello,
>
> how to get rid of this warning
> on a PostgreSQL 8.4.13 prompt?
>
>
> # select 'axxxxxyz' ~ '(.)\1\1';
> WARNING: nonstandard use of escape in a string literal
> LINE 1: select 'axxxxxyz' ~ '(.)\1\1';
> ^
> HINT: Use the escape string syntax for escapes, e.g., E'\r\n'.
> ?column?
> ----------
> f
> (1 row)
>
>
> The table 9-18 at
> http://www.postgresql.org/docs/8.4/static/functions-matching.html
> suggests that using \1 as above should be ok....
>
> Thank you
> Alex
>
>
Try \\1\\1

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Farber 2013-03-22 15:08:09 Re: Referencing parts captured by round brackets in a regex in 8.4.13
Previous Message Alexander Farber 2013-03-22 14:53:44 Referencing parts captured by round brackets in a regex in 8.4.13