Re: How to clean up phone-numbers with regex?

Поиск
Список
Период
Сортировка
От Rob Sargent
Тема Re: How to clean up phone-numbers with regex?
Дата
Msg-id 255A9A75-C8A3-4AE6-91E4-1819BE37DC27@gmail.com
обсуждение исходный текст
Ответ на How to clean up phone-numbers with regex?  (Andreas <maps.on@gmx.net>)
Ответы Re: How to clean up phone-numbers with regex?  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-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

В списке pgsql-sql по дате отправления:

Предыдущее
От: Andreas
Дата:
Сообщение: How to clean up phone-numbers with regex?
Следующее
От: Steve Crawford
Дата:
Сообщение: Re: How to clean up phone-numbers with regex?