allow alpha_numeric and symbols preg_match php
I have the following function
public function alpha_custom($str)
{
return ( ! preg_match("/^([-a-z0-9_-])+$/i", $str)) ? FALSE : TRUE;
}
So ,if the string contains anything other than alpha-numeric characters, underscores or dashes then it will return false.
Now i want to add the following
SPACE&(AND).(period )
Please help me.
Thanks.
Total Views: 67 Today Views: 0
















