Ho messo così ma fa passare tutto

if(ereg("^([^\< >])$",$nome.$citta.$messaggio))