Re: regexp_replace() [noindex] thing

From: Marcus Engene <mengpg2(at)engene(dot)se>
To: POSTGRESQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: regexp_replace() [noindex] thing
Date: 2008-09-25 16:59:37
Message-ID: 48DBC379.2050903@engene.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Marcus Engene <mengpg2(at)engene(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christopher Browne 2008-09-25 17:05:24 Re: [Slony1-general] Re: Stripping out slony after / before / during pg_restore?
Previous Message Tom Lane 2008-09-25 16:41:52 Re: The planner hates me.