public function hasKeyAndValueSubPattern()
    {
        if (!$this->isValidRegex()) {
            return false;
        }

        if (false === strpos($this->string, '(?<key>') || false === strpos($this->string, '(?<value>')) {
            return false;
        }

        return true;
    }