Re: How to remove a set of characters in text-columns ? - Mailing list pgsql-sql

From Steve Crawford
Subject Re: How to remove a set of characters in text-columns ?
Date
Msg-id 4E0CD340.30809@pinpointresearch.com
Whole thread Raw
In response to How to remove a set of characters in text-columns ?  (Andreas <maps.on@gmx.net>)
List pgsql-sql
On 06/30/2011 12:28 PM, Andreas wrote:
> Hi,
> how can I remove a set of characters in text-columns ?
> Say I'd like to remove { } ( ) ' " , ; . : !
> Of course I can chain replace ( replace ( replace ( replace ( ... , '' 
> ) .... and replace the chars one by one against an empty string ''.
>
> There might be a more elegant way.
> Is there ?
>
>
> regards
>
Look at regexp_replace()
http://www.postgresql.org/docs/9.0/static/functions-string.html
http://www.postgresql.org/docs/9.0/static/functions-matching.html#FUNCTIONS-POSIX-REGEXP

Cheers,
Steve



pgsql-sql by date:

Previous
From: Andreas
Date:
Subject: How to remove a set of characters in text-columns ?
Next
From: Charlie
Date:
Subject: Re: [SQL] How to remove a set of characters in text-columns ?