note 43843 deleted from function.preg-match by felipe

From: Date: Mon, 10 Dec 2007 01:38:57 +0000
Subject: note 43843 deleted from function.preg-match by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-133071@lists.php.net to get a copy of this message
Note Submitter: ebiven ---- To regex a North American phone number you can assume NxxNxxXXXX, where N = 2 through 9 and x = 0 through 9. North American numbers can not start with a 0 or a 1 in either the Area Code or the Office Code. So, adpated from the other phone number regex here you would get: /^[2-9][0-9]{2}[-][2-9][0-9]{2}[-][0-9]{4}$/

« previous php.notes (#133071) next »