Re: regexp_replace() [noindex] thing

Поиск
Список
Период
Сортировка
От Marcus Engene
Тема Re: regexp_replace() [noindex] thing
Дата
Msg-id 48DBC379.2050903@engene.se
обсуждение исходный текст
Ответ на Re: regexp_replace() [noindex] thing  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:
> Marcus Engene <mengpg2@engene.se> writes:
>
>> I would like to have a function like the above that returns "innan klas"
>> for this data. I would have expected it to as I use the non greedy version.
>>
>
> regression=# select
>     regexp_replace
> ('innan[noindex]apa[/noindex]klas[noindex]banan[/noindex]',
>                     '\\[noindex\\].*?\\[/noindex\\]',
>                     ' ', 'g');
>  regexp_replace
> ----------------
>  innan klas
> (1 row)

Super!

Best regards,
Marcus


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: The planner hates me.
Следующее
От: Christopher Browne
Дата:
Сообщение: Re: [Slony1-general] Re: Stripping out slony after / before / during pg_restore?