On Fri, Dec 31, 2010 at 12:05, Dmitriy Ugnichenko <mitya.ugnichenko@xxxxxxxxx> wrote: > I guess, this will work fine > > ereg('[0-9]{3}-[0-9]{3}-[0-9]{4}', $phone_number); Not quite. Plus, all ereg* functions have been deprecated for some time now. -- </Daniel P. Brown> Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php