Referencing parts captured by round brackets in a regex in 8.4.13

From: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Referencing parts captured by round brackets in a regex in 8.4.13
Date: 2013-03-22 14:53:44
Message-ID: CAADeyWjo-RoQo=pT2ObwMCAY9HrBd5ZJ2GPNSesWoeqsRbTwQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2013-03-22 14:57:30 Re: Referencing parts captured by round brackets in a regex in 8.4.13
Previous Message Bertrand Janin 2013-03-22 14:50:39 Re: Rewritten rows on unchanged values