Codice PHP:


preg_match
("/^[A-Za-z0-9-_]+$/","ciao0 98 +"
e testa online: http://www.spaweditor.com/scripts/regex/index.php