Re: regexp replace?

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: regexp replace?
Дата
Msg-id Pine.LNX.4.33.0405061518550.5920-100000@css120.ihs.com
обсуждение исходный текст
Ответ на regexp replace?  (CSN <cool_screen_name90001@yahoo.com>)
Список pgsql-general
On Thu, 6 May 2004, CSN wrote:

> I'd like to create a function that will take strings
> like:
>
> abcdef 'quote1' "quote2" / xyz etc.
>
> and return:
>
> abcdef-quote1-quote2-xyz-etc.
>
> Basically remove all characters that aren't
> [A-Za-z0-9], -, or ., and replace all spaces with
> hyphens. Possible? The only string function that
> supports regular expressions is substring and I
> couldn't make that do what I want.

I think translate may be able to do what you want pretty handily.  May
take two passes, i.e. a subselect.


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

Предыдущее
От: Kevin DeGraaf
Дата:
Сообщение: creation permissions when moving from 7.2 -> 7.4
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: 7.2 or 7.4 for critical data?