Hi,
I have forms, and I want to check for phone format validity. Anyone have regular expression function in php to check for phone format? It doesn't have to be RE, can be any function. Thanks.
Mike 😕
Do you mean,
$phone = "514-769-4989"; ereg("\(?([[:digit:]]{3})\)?-?[[:space:]]?([[:digit:]]{3})-?([[:digit:]]{4})", $phone, $key); echo "$key[1] $key[2] $key[3]";
it excepts all formats but I haven't test it.
Andrew