if (preg_match('/[,|\.|~|;]/', $_POST['username']) { $errors[11] = "You can not use ..... characters in username!"; }