public function getVersion($version)
    {

        foreach ($this->versions as $versionPattern) {
            if (preg_match($versionPattern['regex'], $version)) {
                return $versionPattern['version'];
            }
        }

        throw new VersionException('Version not found');
    }