Search Postgresql Archives

excessive escaping in regular expression functions

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

 



Hello,

The following statement replaces an asterisk in a string with a double-escaped asterisk:
SELECT regexp_replace('*',E'\\*',E'\\\\\\\\\*');

I got this result through experimentation and I am at a loss to explain why so much escaping is necessary for the third argument. Is there a better way?

Cheers,
M
-- 
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