public function pattern($pattern = null)
    {
        if (!func_num_args()) {
            return $this->_pattern;
        }
        $this->_token = null;
        $this->_regex = null;
        $this->_variables = null;

        if (!$pattern || $pattern[0] !== '[') {
            $pattern = '/' . trim($pattern, '/');
        }

        $this->_pattern = $this->_prefix . $pattern;
        return $this;
    }