    public static boolean isNewerVersion(String installedVersion, String newVersion) {
        final String regex = "^[1-9\\.]+$";
        if (!installedVersion.matches(regex) || !newVersion.matches(regex)) {
            return false;
        }
        String[] currentParts = installedVersion.split("\\.");
        String[] newPartsParts = newVersion.split("\\.");
        int length = Math.max(currentParts.length, newPartsParts.length);
        for (int i=0; i< length; i++) {
            int currentPart = i < currentParts.length ? 
                    Integer.parseInt(currentParts[i]) : 0;
            int newPart = i < newPartsParts.length ? 
                    Integer.parseInt(newPartsParts[i]) : 0;
            if (currentPart < newPart) {
                return true;
            } else if (newPart < currentPart) {
                return false;
            }
        }
        return false;
    }

    public static boolean isNewerVersion(String installedVersion, String newVersion) {
        final String regex = "^\\d+(\\.\\d+)*$";
        if (!installedVersion.matches(regex) || !newVersion.matches(regex)) {
            return false;
        }
        String[] currentParts = installedVersion.split("\\.");
        String[] newPartsParts = newVersion.split("\\.");
        int length = Math.max(currentParts.length, newPartsParts.length);
        for (int i=0; i< length; i++) {
            int currentPart = i < currentParts.length ? 
                    Integer.parseInt(currentParts[i]) : 0;
            int newPart = i < newPartsParts.length ? 
                    Integer.parseInt(newPartsParts[i]) : 0;
            if (currentPart < newPart) {
                return true;
            } else if (newPart < currentPart) {
                return false;
            }
        }
        return false;
    }
