Thursday, September 25, 2008

Re: [GENERAL] regexp_replace() [noindex] thing

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


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

No comments: