Regex - Mailing list pgsql-general

From MaRCeLO PeReiRA
Subject Regex
Date
Msg-id 20060206201322.12979.qmail@web52709.mail.yahoo.com
Whole thread Raw
Responses Re: Regex  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-general by date:

Previous
From: josue
Date:
Subject: ODBC driver for ps81 win32
Next
From: Tom Lane
Date:
Subject: Re: Regex