agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Rob Sargent <robjsargent@gmail.com>
To: Andreas <maps.on@gmx.net>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: How to clean up phone-numbers with regex?
Date: Mon, 19 May 2014 07:39:58 -0600
Message-ID: <255A9A75-C8A3-4AE6-91E4-1819BE37DC27@gmail.com> (raw)
In-Reply-To: <5379C6C1.5020904@gmx.net>
References: <5379C6C1.5020904@gmx.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>
Have you looked into regular expressions?
Sent from my iPhone
> On May 19, 2014, at 2:54 AM, Andreas <maps.on@gmx.net> wrote:
>
> Hi
>
> I need to clean up phone-numbers. Somehow I got a Excel list that has weird graphical characters trailing some of the entries.
> My DB is UTF8 so it would store this mess but I don't like to import it in the first place.
>
> OK, I know how to read the stuff into a temporary table to clean it up before the actual import.
> How can I do an update on the column that deletes every char that is not in a given set of chars like '+- 0123456/()'?
>
>
> Second but similar question:
> How can I select records that have fields that contain characters not included in a given alphabet?
> E.G. find fields that contain some char not in 0-9,a-z,A-Z, +-()/?
>
>
> regards
> Andreas
view thread (6+ messages) latest in thread
Message-ID: <255A9A75-C8A3-4AE6-91E4-1819BE37DC27@gmail.com>
Permalink: ../255A9A75-C8A3-4AE6-91E4-1819BE37DC27@gmail.com/
Also on: postgresql.org/message-id/255A9A75-C8A3-4AE6-91E4-1819BE37DC27@gmail.com
reply
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: robjsargent@gmail.com, maps.on@gmx.net
Subject: Re: How to clean up phone-numbers with regex?
In-Reply-To: <255A9A75-C8A3-4AE6-91E4-1819BE37DC27@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox