Re: Regex for telephone numbers

From: Date: Fri, 31 Dec 2010 17:05:15 +0000
Subject: Re: Regex for telephone numbers
References: 1  Groups: php.db php.general 
Request: Send a blank email to php-general+get-310434@lists.php.net to get a copy of this message
I guess, this will work fine ereg('[0-9]{3}-[0-9]{3}-[0-9]{4}', $phone_number); On Thu, Dec 30, 2010 at 2:12 AM, Ethan Rosenberg <ethros@earthlink.net>wrote: > Dear List - > > Thank you for all your help in the past. > > Here is another one.... > > I would like to have a regex which would validate that a telephone number > is in the format xxx-xxx-xxxx. > > Thanks. > > Ethan > > MySQL 5.1 PHP 5 Linux [Debian (sid)] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- with best regards, Dmitriy.

« previous php.general (#310434) next »