=> version string /None
358770
def getVersion(self, agent, word):
        
        version_markers = self.version_markers if \
            isinstance(self.version_markers[0], (list, tuple)) else [self.version_markers]
        version_part = agent.split(word, 1)[-1]
        for start, end in version_markers:
            if version_part.startswith(start) and end in version_part:
                version = version_part[1:]
                if end:  # end could be empty string
                    version = version.split(end)[0]
                if not self.allow_space_in_version:
                    version = version.split()[0]
                return version
1109880
def version_str2tuple(cls, version_str):
        
        if not isinstance(version_str, str):
            ValueError('version_str invalid instance.')
        version_info_list = re.findall(r'[0-9a-zA-Z]+', version_str)

        def convert_to_int(string):
            value = None
            if re.match(r'^\d+$', string):
                value = int(string)
            else:
                value = string
            return value

        version_info_list = [convert_to_int(s) for s in version_info_list]

        return tuple(version_info_list)
354259
function parseVersion(versionString) {
  const [release, prerelease] = versionString.split('-')
  const splitRelease = release.split('.').map(number => parseInt(number, 10))

  return {
    major: splitRelease[0],
    minor: splitRelease[1],
    patch: splitRelease[2],
    prerelease: prerelease || '',
    raw: versionString
  }
}
1153199
def is_version(string)
      return false if string === false || string === true || string.nil?
      string.to_s.match(/^\d+[\d\.a-zA-Z\-_~]*/)
    end
1057022
function (version, semverIndex)
	{
		const splittedVersion = version.split('.');
		splittedVersion[ semverIndex ] = parseInt(splittedVersion[ semverIndex ], 10) + 1;
		while (semverIndex < 2)
		{
			splittedVersion[ ++semverIndex ] = '0';
		}
		return splittedVersion.join('.');
	}
482330
def read_version():
    ""
    version_file = local_file('source', 'added_value', 'version.py')
    local_vars = {}
    with open(version_file) as handle:
        exec(handle.read(), {}, local_vars)  # pylint: disable=exec-used
    return local_vars['__version__']
674074
def get_version(exe_path='youtube-dl'):
    ''''''
    process = subprocess.Popen(
        [exe_path, '--version'],
        stdout=subprocess.PIPE
    )
    version_string = process.communicate()[0]
    version_string = version_string.decode().strip()

    assert ' ' not in version_string, version_string

    return version_string
215154
function (version) {
    var vs = version.replace(/[^0-9\\.]/g, '');
    vs = vs.replace(/\./g, '_');
    return vs;
  }
719715
function compareVersions(v1, v2) {
    if (semver.gt(v1.tag, v2.tag)) {
        return -1;
    }
    if (semver.lt(v1.tag, v2.tag)) {
        return 1;
    }
    return 0;
}
1135624
protected String stripVersionFromName(String name, String version) {
        int versionBeginIndex = name.lastIndexOf("-" + version);
        if ( versionBeginIndex != -1) {
            return name.substring(0, versionBeginIndex) + name.substring(versionBeginIndex + version.length() + 1);
        } else {
            return name;
        }
    }
348577
def _str_to_version(version_str, allow_wildcard=False):
  """"""
  reg = _VERSION_WILDCARD_REG if allow_wildcard else _VERSION_RESOLVED_REG
  res = reg.match(version_str)
  if not res:
    msg = "Invalid version '{}'. Format should be x.y.z".format(version_str)
    if allow_wildcard:
      msg += " with {x,y,z} being digits or wildcard."
    else:
      msg += " with {x,y,z} being digits."
    raise ValueError(msg)
  return tuple(
      v if v == "*" else int(v)
      for v in [res.group("major"), res.group("minor"), res.group("patch")])
135662
def run_version(args: dict) -> int:
    """"""
    version = environ.package_settings.get('version', 'unknown')
    print('VERSION: {}'.format(version))
    return 0
64316
def parse_version(output):
    
    for x in output.splitlines():
        match = VERSION_PATTERN.match(x)
        if match:
            return match.group('version').strip()
    return None
115313
def _get_python_version_string():
    
    version_info = sys.version_info
    return '.'.join(map(str, [version_info[0], version_info[1], version_info[2]]))
962879
def get_bin_version_str(bin_path, version_flag='-v', kw={}):
    

    try:
        prog = _get_exec_binary(bin_path, kw)
        version_str = version_expr.search(
            check_output([prog, version_flag], **kw).decode(locale)
        ).groups()[0]
    except OSError:
        logger.warning("failed to execute '%s'", bin_path)
        return None
    except Exception:
        logger.exception(
            "encountered unexpected error while trying to find version of "
            "'%s':", bin_path
        )
        return None
    logger.info("'%s' is version '%s'", bin_path, version_str)
    return version_str
282599
def version(self, version_str: str) -> None:
        
        ver = []
        for i in version_str.split('.'):
            ver.append(int(i))
            self.filter_negatives(int(i))
        self._major, self._minor, self._patch = ver[0], ver[1], ver[2]
934924
private static String parseVersionNumber(String line) {
        StringTokenizer tokenizer = new StringTokenizer(line, " \t");

        if (!expect(tokenizer, "sourceInfo") || !expect(tokenizer, "version") || !tokenizer.hasMoreTokens()) {
            return null;
        }

        return tokenizer.nextToken();
    }