private function filter($text)
    {
        $text = preg_replace("/[^&a-z0-9-_\s']/i", '', $text);
        $text = str_replace(' ', $this->separator, $text);
        $text = trim(preg_replace("/{$this->separator}{2,}/", $this->separator, $text), $this->separator);

        return $text;
    }
private function filter($text)
    {
        $text = preg_replace("/[^&a-z0-9-_\s']/i", '', $text);
        $text = str_replace(' ', $this->separator, $text);
        $text = trim(preg_replace("/{$this->separator}{2,}/", $this->separator, $text), $this->separator);

        return $text;
    }
private function filter ( $ text ) { $ text = preg_replace ( "/[^&a-z0-9-_\s']/i" , '' , $ text ) ; $ text = str_replace ( ' ' , $ this -> separator , $ text ) ; $ text = trim ( preg_replace ( "/{$this->separator}{2,}/" , $ this -> separator , $ text ) , $ this -> separator ) ; return $ text ; }
Strip anything that isn't alphanumeric or an underscore.

@param string $text

@return string
Strip anything that isn t alphanumeric or an underscore .