code: public static String parsePreVersion(String text) {
          if (parseVersion(text) == null) {
              return text;
          }
  
          final Matcher matcher = RX_PRE_VERSION.matcher(text);
          if (matcher.find()) {
              return matcher.group(1);
          }
          return text;
      }
docs: <p>
  A utility class to extract the part before version numbers from file
  names (or other strings containing version numbers. In most cases, this
  part represents a more accurate name than the full file name.</p>
  <pre>
  Example:
  Give the file name: library-name-1.4.1r2-release.jar
  This function would return: library-name</pre>
  
  @param text the text being analyzed
  @return the part before the version numbers if any, otherwise return the
  text itself.