>
> The regex *should* accept numbers formatted as such:
>
> 000-000-0000
> (000) 000-0000
> (000)000-0000
> 000.000.0000
>
> where the zeroes represent a digit range from 2-9 in the first
> position, of area code and prefix, and any digit in any other
> position.
How about:
^(\([2-9]\d{2}\)|[2-9]\d{2})[ \.-][2-9]\d{2}[ \.-]\d{4}$
> \(?[2-9]\d\d\)?[ -]?[2-9]\d\d-\d{4}
Don't use a style where you make the check for a ")" a differnet
check from the check for a "(", that would allow unbalanced phone
numbers such as "000) 000-0000". Always check them both at the
same time so you get all or nothing.
Jochem
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

