Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 8162720AEDF for ; Sun, 5 Feb 2012 09:47:02 -0400 (AST) Received: from mailout-de.gmx.net ([213.165.64.22]) by makus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Ru2Qm-0007qC-Qb for pgsql-sql@postgresql.org; Sun, 05 Feb 2012 13:47:01 +0000 Received: (qmail invoked by alias); 05 Feb 2012 13:46:46 -0000 Received: from mue-88-130-52-003.dsl.tropolys.de (EHLO [192.168.1.113]) [88.130.52.3] by mail.gmx.net (mp028) with SMTP; 05 Feb 2012 14:46:46 +0100 X-Authenticated: #14269776 X-Provags-ID: V01U2FsdGVkX18r4ZAHXekrWbP/LDkxwcUjDnEw0DRLnFGIZn+hnv 54jATjFKbvx9wu Message-ID: <4F2E887D.3040108@gmx.net> Date: Sun, 05 Feb 2012 14:47:41 +0100 From: Andreas User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0) Gecko/20120129 Thunderbird/10.0 MIME-Version: 1.0 To: "pgsql-sql@postgresql.org" Subject: Is there a way to remove every character but numbers? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Pg-Spam-Score: -0.5 (/) X-Archive-Number: 201202/14 X-Sequence-Number: 36307 Hi, I need to clean up a text column so that it just contains numbers or the "+" sign if it is the first character of the string. Well, it is needed to normalise up a phone number column. So it'd be great if the "+" could be transformed in "00" in the same step.