[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-sql
Subject:    [SQL] =?utf-8?B?UmU6IFtTUUxdIEhvdyB0byByZW1vdmUgYSBzZXQgb2YgY2hhcmFjdGVycyBpbiB0ZXh0LWNvbHVtbnMgPw==
From:       Charlie <scorpdaddy () hotmail ! com>
Date:       2011-06-30 19:57:08
Message-ID: BLU0-SMTP1870ADD1AC3E8DDFBC4BBA3CE580 () phx ! gbl
[Download RAW message or body]

[Attachment #2 (text/plain)]

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


[Attachment #3 (text/html)]

Would <br><br>regexp_replace(src_str, &#39;[\{\}\[\]\(\)\.&#39;, \
&#39;&#39;)<br><br>at<br><br><a \
href="http://www.postgresql.org/docs/9.0/static/functions-string.html">http://www.post \
gresql.org/docs/9.0/static/functions-string.html</a><br><br>help?<br><br><br><br><br>----- \
Reply message -----<br>From: &quot;Andreas&quot; &lt;maps.on@gmx.net&gt;<br>Date: \
Thu, Jun 30, 2011 4:28 pm<br>Subject: [SQL] How to remove a set of characters in \
text-columns ?<br>To: &lt;pgsql-sql@postgresql.org&gt;<br><br>Hi,<br>how can I remove \
a set of characters in text-columns ?<br>Say I&#39;d like to remove { } ( ) &#39; \
&quot; , ; . : !<br>Of course I can chain replace ( replace ( replace ( replace ( ... \
, &#39;&#39; ) ..... and replace the chars one by one against an empty string \
&#39;&#39;.<br><br>There might be a more elegant way.<br>Is there \
?<br><br><br>regards<br><br>-- <br>Sent via pgsql-sql mailing list \
(pgsql-sql@postgresql.org)<br>To make changes to your subscription:<br><a \
href="http://www.postgresql.org/mailpref/pgsql-sql">http://www.postgresql.org/mailpref/pgsql-sql</a><br><br><br><br><br><br>




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic