excessive escaping in regular expression functions

Поиск
Список
Период
Сортировка
От A.M.
Тема excessive escaping in regular expression functions
Дата
Msg-id 5F572960-D55F-49FE-96A6-BCAFB0FFFF9C@themactionfaction.com
обсуждение исходный текст
Ответы Re: excessive escaping in regular expression functions
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: araza@esri.com
Дата:
Сообщение: How to get TimeZone name?
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: excessive escaping in regular expression functions