Re: Replacing characters in a string
От
Szymon Guz
Тема
Re: Replacing characters in a string
Дата
Msg-id
AANLkTimO5HW0ePesW8X8H6DxiJ37a7mxuK3Bey-K+uAB@mail.gmail.com
Ответ на
Replacing characters in a string (Luís de Sousa)
Список
Дерево обсуждения
Replacing characters in a string Luís de Sousa <luis.a.de.sousa@gmail.com>
Re: Replacing characters in a string Michele Petrazzo - Unipex <michele.petrazzo@unipex.it>
Re: Replacing characters in a string Luís de Sousa <luis.a.de.sousa@gmail.com>
Re: Replacing characters in a string Pavel Stehule <pavel.stehule@gmail.com>
Re: Replacing characters in a string Sergey Konoplev <gray.ru@gmail.com>
Re: Replacing characters in a string Tom Lane <tgl@sss.pgh.pa.us>
Re: Replacing characters in a string Szymon Guz <mabewlun@gmail.com>
Re: Replacing characters in a string Thom Brown <thom@linux.com>
2010/9/14 Luís de Sousa <luis.a.de.sousa@gmail.com>
Hello everyone,
I need to replace all occurrences of a certain character in a string.
For that I'm using regexp_replace, but so far I only managed to
replace the first character, here's an example:
> SELECT regexp_replace('xaxx', 'x', 'e');
regexp_replace
----------------
eaxx
(1 row)
But the result I'd need is 'eaee'. How can I do it?
Hi,
try this one:
SELECT regexp_replace('xaxx', 'x', 'e', 'g');
regards
Szymon Guz
В списке pgsql-general по дате отправления