Regex

From: MaRCeLO PeReiRA <gandalf_mp(at)yahoo(dot)com(dot)br>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Regex
Date: 2006-02-06 20:13:22
Message-ID: 20060206201322.12979.qmail@web52709.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

Is there a way to execute a regex, inside a SELECT
statement, to substitute things?

For example:

SELECT name FROM mytable;
name
---------
john
michael
robert
richard
chandler

I want to substitute all "r" to "-"

SELECT myfunction(name) FROM mytable;
name
---------
john
michael
-obert
-icha-d
chandle-

Any idea??

Thanks in advance,
Regards,

Marcelo P.
Brazil


_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
http://br.acesso.yahoo.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-02-06 20:35:34 Re: Regex
Previous Message josue 2006-02-06 20:06:34 ODBC driver for ps81 win32