i'm trying to make this function:
Code: Select all
function alpha_space($str)
{
return ( ! preg_match("/^([-a-z0-9_\ -])+$/i", $str)) ? FALSE : TRUE;
}
i've tried:
Code: Select all
function alpha_space($str)
{
return ( ! preg_match("/^([-a-z\x{5D0}-\x{5EA}0-9_\ -])+$/i", $str)) ? FALSE : TRUE;
}
also
Code: Select all
function alpha_space($str)
{
return ( ! preg_match("/^([-a-z?-?0-9_\ -])+$/i", $str)) ? FALSE : TRUE;
}
how can it be done?
thanx...