integer only sposix/regex

From: rodeored <info1(at)reenie(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: integer only sposix/regex
Date: 2009-06-16 03:21:23
Message-ID: 9958fe01-fd4d-46be-b488-f48ce777960f@j9g2000prh.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to search phone numbers for digits. Unfortunately, the
validation has been sloppy and the numbers are not just numbers, they
also have dashes and probably other stuff.
I would like the search to ignore anything but integers

WHERE (a.phone1 ~* '.*626.*' OR a.phone2 ~* '.*626.*' OR a.phone2 ~*
'.*626.*')

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2009-06-16 04:28:24 Re: pl/sql resources for pl/pgsql?
Previous Message Bruce Momjian 2009-06-16 02:53:04 Re: Perf differences between timestamp and timestamp with timezone