é sufficiente un controllo:
Codice PHP:
if (preg_match("/^[a-z0-9\-]{0,}$/"$VARIABILE)) {etc 
Grazie.