Просмотр поста #89964: Небольшой фильтр переменной

.
Jahak
<?php
function validName($n) {
return preg_match ('#^([a-zA-Z0-9\*]+)$#' , $n);
}