(xx) xxxx-xxxx
notem q tem um espaço entre o ) e os numeors....
to tentando assim:
(!preg_match("|\([0-9]\){2} [0-9]{4}\-[0-9]{4}|",$fone))
se alguem puder ajudar
Posted 17/03/2006, 09:22
(!preg_match("|\([0-9]\){2} [0-9]{4}\-[0-9]{4}|",$fone))
Posted 17/03/2006, 09:30
Posted 17/03/2006, 09:38
2177777777
217777-7777
(21)77777777
(21)7777-7777
(21) 77777777
<?php $tel = '2177777777'; if (!preg_match('|\(?\d{2}\)? ?\d{4}\-?\d{4}|', $tel)) { print 'Formato inválido para o telefone.'; } else { print $tel = preg_replace('|(\d{2}) ?(\d{4})\-?(\d{4})|', '(\\1) \\2-\\3', $tel); } ?>
Posted 17/03/2006, 10:13
Edição feita por: gonacts, 17/03/2006, 10:29.
Posted 17/03/2006, 11:45
Edição feita por: Renan Gonçalves, 17/03/2006, 11:48.
Renan Gonçalves
renan.saddam@gmail.com
(WebSite / Gmail / orkut / Windows Live! Messenger)
"Aquele que se define se limita."
Posted 17/03/2006, 13:11
|\(?(\d{2})\)? ?(\d{4})\-?(\d{4})|
Posted 17/10/2017, 01:58
Posted 17/10/2017, 18:45
Posted 17/10/2017, 18:46
Posted 17/10/2017, 21:17
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)