Re: regexp replace?

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: CSN <cool_screen_name90001(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: regexp replace?
Date: 2004-05-06 22:21:24
Message-ID: 20040506222123.GD32667@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, May 06, 2004 at 01:59:16PM -0700, CSN wrote:

> 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.

This should be trivial with plperl ... I'd think you are wasting your
time trying to do it with plpgsql or SQL; this is what Postgres
flexibility is for!

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Ni aun el genio muy grande llegaría muy lejos
si tuviera que sacarlo todo de su propio interior" (Goethe)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2004-05-06 22:52:16 Problem with commandprompt.com
Previous Message Josué Maldonado 2004-05-06 21:46:56 Re: Copy entire row on elete