def _match_version_string(version):
    matched = _VERSION_STRING_REGEX.match(version)
    g = matched.groups()
    major, minor, micro = g[0], g[2], g[4]
    if major and minor and micro:
        major, minor, micro = int(major), int(minor), int(micro)
    else:
        raise GnuPGVersionError("Could not parse GnuPG version from: %r" %
                                version)
    return (major, minor, micro)