codice:
if (preg_match("#^\d{3,4}/?\d{6,7}$#", $num)) {
pero' accetta anche numeri di 9 cifre (3+6) o 11 (4+7), non so se e' accettabile.