preg_match for hebrew characters?
Posted: Sun Nov 22, 2009 5:02 am
hey all,
i'm trying to make this function:
check also hebrew characters, but i fail every time...
i've tried: but its no good...
also same thing...
how can it be done?
thanx...
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...