Codice PHP:
if (!preg_match("/^[a-zA-Z0-9\\-_]{0,12}$/",$_POST['user'])) {
  
$errori 1;