private static GoVer parse(String s, int missingPatchValue) {
		// handle extra info at end of ver string: "1.22.8 X:rangefunc"
		String[] parts =
			Objects.requireNonNullElse(s, "").replaceAll("[^.0-9].*$", "").split("\\.");
		if (parts.length < 2) {
			return INVALID;
		}
		try {
			int major = Integer.parseInt(parts[0]);
			int minor = Integer.parseInt(parts[1]);
			int patch = parts.length > 2
					? Integer.parseInt(parts[2])
					: missingPatchValue;
			return new GoVer(major, minor, patch);
		}
		catch (NumberFormatException e) {
			// fall thru, return invalid
		}
		return INVALID;
	}
Parses a version string ("1.2.0") and returns a GoVer instance, or INVALID if bad data.
<p>
Missing patch numbers will be replaced with the wildcard value.
 
@param s string to parse, "1.2.3", or "1.2"
@return GoVer instance, or INVALID
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/GoVer.java