Re: Regular expressions in procs

From: "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at>
To: "Steve Manes *EXTERN*" <smanes(at)magpie(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Regular expressions in procs
Date: 2007-06-14 08:15:40
Message-ID: AFCCBB403D7E7A4581E48F20AF3E5DB2035FB95C@EXADV1.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Steve Manes wrote:
> I apologize if I'm having a rookie brain block, but is there a way to
> massage a string inside a proc to, for instance, strip it of all
> non-alpha characters using a regular expression?

SELECT regexp_replace(E'--> text\\\0120815_12 <--', '[^[:alpha:]]', '',
'g');
regexp_replace
----------------
text
(1 row)

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2007-06-14 08:30:03 Re: inner join problem with temporary tables
Previous Message Pavel Stehule 2007-06-14 07:41:29 Re: [SQL] setof or array as input parameter to postgresql 8.2 functions