Re: Simple method to format a string

Поиск
Список
Период
Сортировка
От Emi Lu
Тема Re: Simple method to format a string
Дата
Msg-id 4FE22848.5050309@encs.concordia.ca
обсуждение исходный текст
Ответ на Re: Simple method to format a string  ("ktm@rice.edu" <ktm@rice.edu>)
Список pgsql-sql
> Just a small optimization would be to use a backreference with regexp_replace
> instead of regexp_matches:
>
> select regexp_replace('foobarbaz', '(...)', E'\\1 ', 'g');
>   regexp_replace
> ----------------
>   foo bar baz

Great.

After combined with several more replace(s), regexp_replace will provide 
me the expecting result.

Thanks!
Emi

-- 
select
regexp_replace(   replace(       replace(col-val, ' ', ''), '-', ''),        .... replace...    '(...)', E'\\1 ', 'g')
from tn;




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

Предыдущее
От: "ktm@rice.edu"
Дата:
Сообщение: Re: Simple method to format a string
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Is there a similarity-function that minds national charsets?