This question already has an answer here:
Please I need help to validate phone numbers in various formats
Valid formats:
+111 1 11111111
+11 1111111
1111111
(+111) (11) 1111111
Etc, the format is:
Have This:
if(strlen($buff) < 8)
return false;
$buff = trim(preg_replace('/\s+/', ' ', $buff));
if(preg_match('/^\(\d\) \d \d$/', $buff))
return $buff;
return false;
Thanks.
</div>
Smartphone tactics:
+
00
if it is a +
000
by 00
x
and y
You don't even need regex for that.