Re: Possible RegEx bug for lower-case a and s characters

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Possible RegEx bug for lower-case a and s characters
Дата
Msg-id CAKFQuwb=zb6wou7wQ2PjaoHXqVBKH=rs3CVXW0wTdfdEDmKfVA@mail.gmail.com
обсуждение исходный текст
Ответ на Possible RegEx bug for lower-case a and s characters  ("DeFreitas, Nigel" <nigel.defreitas@verisk.com>)
Список pgsql-bugs


On Thu, Nov 17, 2022 at 4:00 AM DeFreitas, Nigel <nigel.defreitas@verisk.com> wrote:


select regexp_replace('Nigel DeFreit a  s', E'[\s+|"]|[\n\r\f\a\t]|[^[:ascii:]]','','g') AS result;



Don't use E strings when writing regex.  It adds a whole other layer of backslash escaping that you really don't want to deal with.

David J.

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

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: WAL segments removed from primary despite the fact that logical replication slot needs it.
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: WAL segments removed from primary despite the fact that logical replication slot needs it.