private OptionalInt compareNonNumericChars(String firstWord, String secondWord) {
        // Look for any initial non-numeric characters. If present, we
        // should begin by comparing those.
        final Matcher fn = NUMERIC.matcher(firstWord);
        final Matcher sn = NUMERIC.matcher(secondWord);

        if (fn.find()) {
            if (sn.find()) { // Both are numeric
                final int f = Integer.parseInt(fn.group());
                final int s = Integer.parseInt(sn.group());
                final int c = Integer.compare(f, s);
                if (c != 0) return OptionalInt.of(c);
            } else { // secondWord is not numeric. We are not equal.
                return OptionalInt.of(firstWord.compareTo(secondWord));
            }
        } else {
            if (sn.find()) { // secondWord is numeric but firstWord isn't
                return OptionalInt.of(firstWord.compareTo(secondWord));
            } else { // Neither is numeric
                final int c = firstWord.compareTo(secondWord);
                if (c != 0) return OptionalInt.of(c);
            }
        }
        return OptionalInt.empty();
    }
Specialized String Comparator that evaluated two versions as semantic
versions.

@author Emil Forslund
@since  3.0.10
tool-parent/tool-core/src/main/java/com/speedment/tool/core/internal/util/SemanticVersionComparator.java