agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: David G Johnston <david.g.johnston@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: How to clean up phone-numbers with regex?
Date: Mon, 19 May 2014 08:52:12 -0700 (PDT)
Message-ID: <1400514732379-5804493.post@n5.nabble.com> (raw)
In-Reply-To: <537A26B5.3030309@pinpointresearch.com>
References: <5379C6C1.5020904@gmx.net>
	<537A26B5.3030309@pinpointresearch.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

Steve Crawford wrote
> On 05/19/2014 01:54 AM, Andreas wrote:
> 
>>
>> 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, +-()/?
>>
> See regexp_match on the above-referenced page.
> 
> Cheers,
> Steve

Actually, section "9.7.3. POSIX Regular Expressions" - specifically table
9-11 at the beginning of that section - is the most common way to perform
the tests in a where clause.  regexp_matches(...) is for when you want to
extract data.

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/How-to-clean-up-phone-numbers-with-regex-tp5804450p5804493.h...
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (6+ messages)

Message-ID: <1400514732379-5804493.post@n5.nabble.com>
Permalink:  ../1400514732379-5804493.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1400514732379-5804493.post@n5.nabble.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: david.g.johnston@gmail.com
  Subject: Re: How to clean up phone-numbers with regex?
  In-Reply-To: <1400514732379-5804493.post@n5.nabble.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