From: Charlie <scorpdaddy@hotmail.com>
To: Andreas <maps.on@gmx.net>
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] How to remove a set of characters in text-columns ?
Date: Thu, 30 Jun 2011 16:57:08 -0300
Message-ID: <BLU0-SMTP1870ADD1AC3E8DDFBC4BBA3CE580@phx.gbl> (raw)
Would
regexp_replace(src_str, '[\{\}\[\]\(\)\.', '')
at
http://www.postgresql.org/docs/9.0/static/functions-string.html
help?
----- Reply message -----
From: "Andreas" <maps.on@gmx.net>
Date: Thu, Jun 30, 2011 4:28 pm
Subject: [SQL] How to remove a set of characters in text-columns ?
To: <pgsql-sql@postgresql.org>
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
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: scorpdaddy@hotmail.com, maps.on@gmx.net
Subject: Re: Re: [SQL] How to remove a set of characters in text-columns ?
In-Reply-To: <BLU0-SMTP1870ADD1AC3E8DDFBC4BBA3CE580@phx.gbl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox