code: public static boolean isValidPreRelease(String preRelease) {
          return preRelease != null &&
                  (preRelease.isEmpty() || PRE_RELEASE.matcher(preRelease).matches());
      }
docs: Returns whether the given String is a valid pre-release identifier. That is, this
  method returns <code>true</code> if, and only if the {@code preRelease} parameter
  is either the empty string or properly formatted as a pre-release identifier
  according to the semantic version specification.
  
  <p>
  Note: this method does not throw an exception upon <code>null</code> input, but
  returns <code>false</code> instead.
  </p>
  
  @param preRelease The String to check.
  @return Whether the given String is a valid pre-release identifier.
  @since 0.5.0