i think there is an easier way, but this is what I am using until I figure out a better way:
<?php
$test = eregi_replace("([a-z])", "", $input);
if ($test != "") {
echo("Illegal username");
}
?>
if you want more than just letters, put what you want in the brackets and it will allow that symbol.