Kris Vose wrote:
> How would you write a regular expression that defines a phone number:  ex. 
> In other words how would you check to see if there were three numerics surrounded by 
>(), then
> three numerics with a "-", then four numerics.

with posix regular expression, for example :
$pattern = "\([0-9]{3}\)[0-9]{3}\-[0-9]{4}";
$pattern = "\([0-9]{3}\)[0-9]{3}-[0-9]{4}";
(i m not sure for the -)

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to