code: public static Optional<SaltVersion> parse(String versionString) {
          Matcher matcher = SALT_VERSION_REGEX.matcher(versionString);
          if (matcher.matches()) {
              int year = Integer.parseInt(matcher.group(1));
              int month = Integer.parseInt(matcher.group(2));
              int bugfix = Integer.parseInt(matcher.group(3));
              Optional<Integer> rc = Optional.ofNullable(matcher.group(5))
                      .map(Integer::parseInt);
              return Optional.of(new SaltVersion(year, month, bugfix, rc));
          } else {
              return Optional.empty();
          }
      }
docs: Parses a salt version string
  @param versionString the salt version string
  @return SaltVersion if the versionString is valid or empty Optional if not.