code: public static String extractVersionFromUri(String uri) {
          if (uri == null)
              return null;
          Matcher matcher = BASE_DICTIONARY_URI_PATTERN.matcher(uri);
          if (matcher.matches())
              return matcher.group(1);
          else {
              matcher = DEFAULT_USER_DICTIONARY_URI_PATTERN.matcher(uri);
              if (matcher.matches())
                  return matcher.group(1);
          }
          return null;
      }
docs: Extracts the NAACCR version from an internal dictionary URI.
  @param uri internal dictionary URI
  @return the corresponding NAACCR version, null if it can't be extracted