I've got the following code:
<?php
$test = "xxxx..AAA?!";
echo $test."\n";
$test = preg_replace("[^a-zA-Z0-9-]", "", $test);
echo $test."\n";
?>
I want to delete all chars which aren't letters, numbers or a minus
What's my mistake?