Referencing parts captured by round brackets in a regex in 8.4.13 - Mailing list pgsql-general

From Alexander Farber
Subject Referencing parts captured by round brackets in a regex in 8.4.13
Date
Msg-id CAADeyWjo-RoQo=pT2ObwMCAY9HrBd5ZJ2GPNSesWoeqsRbTwQQ@mail.gmail.com
Whole thread Raw
Responses Re: Referencing parts captured by round brackets in a regex in 8.4.13
List pgsql-general
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


pgsql-general by date:

Previous
From: Bertrand Janin
Date:
Subject: Re: Rewritten rows on unchanged values
Next
From: Rob Sargent
Date:
Subject: Re: Referencing parts captured by round brackets in a regex in 8.4.13