function nickname($str)
{
$a = explode(' ', $str);
$error = 0;
foreach($a as $b)
if(!preg_match("/^[a-zA-Z]{3}+(([\'\-][a-zA-Z]{2})?[a-zA-Z]*)*$/", $b))
$error++;
return $error ? FALSE : TRUE;
}
preg_match("^[A-Z]{1}+[a-z]{2}+(([\'\-][a-zA-Z]{2})?[a-z]*)*$", $b)
Try
PHP:preg_match("^[A-Z]{1}+[a-z]{2}+(([\'\-][a-zA-Z]{2})?[a-z]*)*$", $b)
didnt work :/ i could still change my name to pLaYeR