code: private static List<String> splitVersion(String s) {
          //TODO improve performance by removing regex.
          final Pattern pattern = Pattern.compile("^([\\d]+?)(.*)$");
          final String[] splitString = s.split("(\\.|:-)");
  
          final List<String> res = new ArrayList<>();
          for (String token : splitString) {
              if (token.matches("^[\\d]+?[A-z]+")) {
                  final Matcher matcher = pattern.matcher(token);
                  matcher.find();
                  final String g1 = matcher.group(1);
                  final String g2 = matcher.group(2);
  
                  res.add(g1);
                  res.add(g2);
              } else {
                  res.add(token);
              }
          }
          return res;
      }
docs: Method that split versions for '.', '|', ':' and '-". Then if a token
  start with a number and then contains letters, it will split it too. For
  example "12a" is split into ["12", "a"]. This is done to support correct
  comparison of "5.0.3a", "5.0.9" and "5.0.30".
  
  @param s the string to split
  @return an Array of String containing the tokens to be compared