public static @Nullable Version parseVersion(@NotNull String version, Pattern @NotNull ... patterns) {
    String[] versions = null;

    for (Pattern pattern : patterns) {
      Matcher matcher = pattern.matcher(version);
      if (matcher.find()) {
        String versionGroup = matcher.group(1);
        if (versionGroup != null) {
          versions = versionGroup.split("\\.");
          break;
        }
      }
    }

    if (versions == null || versions.length < 2) {
      return null;
    }

    return new Version(Integer.parseInt(versions[0]),
                       Integer.parseInt(versions[1]),
                       versions.length > 2 ? Integer.parseInt(versions[2]) : 0);
  }
public static @Nullable Version parseVersion(@NotNull String version, Pattern @NotNull ... patterns)