RE: [PHP] Regex for telephone number

2001-01-15 Thread Jason Murray
> 123 4567 > 1234567 > +91 44 123 4567 > +91 44 1234567 > 91-44-123 4567 > 91-44-1234567 So, 91441234567 and 9 1 4 4 1 2 3 4 5 6 7 aren't valid? You *could* apply a rule here, but it's fallible. 1. Strip out everything thats not a number (ereg_replace("[^0-9]", "")). 2. Count the number of dig

Re: [PHP] Regex for telephone number

2001-01-15 Thread Vikram Vaswani
Thanks for the reply. I'd like to ensure that numbers entered are in any of these formats: 123 4567 1234567 +91 44 123 4567 +91 44 1234567 91-44-123 4567 91-44-1234567 Number will be a minimum of 5 digits. TIA Vikram At 12:11 AM 1/16/01 +1100, Angus Mann wrote: >At 17:55 15/01/01 +0500, Vikr

RE: [PHP] Regex for telephone number

2001-01-15 Thread Jason Murray
> Can someone help me out with a regex to validate a phone number? That's a tough one, because 555- is just as valid as 1-800-BILLME. And here in Australia we have 131166 (yes, all you Aussies, that *IS* Pizza Hut's number... I couldn't think of any others :)) The best you can really do is m

Re: [PHP] Regex for telephone number

2001-01-15 Thread Alex Black
groovy changes are afoot! _alex -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 > From: [EMAIL PROTECTED] (Vikram Vaswani) > Newsgroup

RE: [PHP] Regex for telephone number

2001-01-15 Thread Spallek, Heiko
Hi! > Can someone help me out with a regex to validate a phone number? Read the examples at: http://www.php.net/manual/en/function.ereg-replace.php Der Heiko Buchtipp: http://www.aufbruch.com/ Heiko und Gisela Spallek: Aufbruch ins Land der unbegrenzten Moeglichkeiten. Studieren, Arbeiten und L

Re: [PHP] Regex for telephone number

2001-01-15 Thread Angus Mann
At 17:55 15/01/01 +0500, Vikram Vaswani wrote: >Hi! > >Can someone help me out with a regex to validate a phone number? We'd need to know what format of telephone numbers you're looking to validate, first. Angus. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAI

[PHP] Regex for telephone number

2001-01-15 Thread Vikram Vaswani
Hi! Can someone help me out with a regex to validate a phone number? Thanks Vikram -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]