protected static function filter($field)
    {
        $field = preg_replace('/[\.\/\\:;,?$*!#_-]/', '', $field);
        $field = preg_replace('/\s+/', ' ', trim($field));
        return $field;
    }
protected static function filter($field)
    {
        $field = preg_replace('/[\.\/\\:;,?$*!#_-]/', '', $field);
        $field = preg_replace('/\s+/', ' ', trim($field));
        return $field;
    }
protected static function filter ( $ field ) { $ field = preg_replace ( '/[\.\/\\:;,?$*!#_-]/' , '' , $ field ) ; $ field = preg_replace ( '/\s+/' , ' ' , trim ( $ field ) ) ; return $ field ; }
Remove unwanted characters

@param string $field Field to be filtered
Remove unwanted characters