List:General Discussion« Previous MessageNext Message »
From:Paul Nowosielski Date:December 3 2008 8:45am
Subject:Re: REGEXP help Finding phone numbers (nnn) nnn-nnnn format SOLVED
View as plain text  
This seems to do it:

SELECT phone_work FROM leads WHERE phone_work REGEXP '[(]{1}([0-9]){3}[)]{1}[
]?([^0-1]){1}([0-9]){2}[ ]?[-]?[ ]?([0-9]){4}'



----- Original Message ----
From: Paul Nowosielski <paulnowosielski@stripped>
To: mysql@stripped
Sent: Wednesday, December 3, 2008 2:39:54 PM
Subject: REGEXP help Finding phone numbers (nnn) nnn-nnnn format

Hi,

Please, can anyone lend a hand in helping pullout
phone numbers from the DB that only match
the format (nnn) nnn-nnnn ?

SELECT phone_work FROM leads WHERE phone_work REGEXP 'the_expression?'

I've been trying to lick this for hours now with
no avail.

Thank you,

Paul



      

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=1


      
Thread
REGEXP help Finding phone numbers (nnn) nnn-nnnn formatPaul Nowosielski3 Dec
  • Re: REGEXP help Finding phone numbers (nnn) nnn-nnnn format SOLVEDPaul Nowosielski3 Dec
  • Re: REGEXP help Finding phone numbers (nnn) nnn-nnnn formatwim.delvaux3 Dec