On Fri, Dec 31, 2010 at 19:09, Jim Lucas <li...@cmsws.com> wrote:
>
> Actually...
>
> Specified here [1] it says that the {1,} is the same as '+'.  I think you 
> should
> drop the comma.  If you don't this would be valid 844-2345-123456
>
> ^[2-9]{1,}[0-9]{2,}\-[2-9]{1,}[0-9]{2,}\-[0-9]{4,}$
>
> should be
>
> ^[2-9]{1}[0-9]{2}\-[2-9]{1}[0-9]{2}\-[0-9]{4}$

    Bah, you're absolutely correct.  Force of habit with the commas.
I didn't even notice the sample test cases I put into that test array
didn't check for more than the number of digits per field, either.
Good catch, Jim, and Happy New Year.

-- 
</Daniel P. Brown>
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to