Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux