public int parseByNumbers(String str) {
        if (str == null || str.isEmpty()) {
            return 0;
        }

        int total = 0;
        int strLen = str.length();

        StringBuilder tmpStr = new StringBuilder();

        for (int i = 0; i < strLen; i++) {
            char ch = str.charAt(i);
            if (Character.isDigit(ch)) {
                tmpStr.append(ch);
            } else if (tmpStr.length() > 0) {
                total = total + Integer.parseInt(tmpStr.toString());
                tmpStr = new StringBuilder();
            }
        }

        if (tmpStr.length() > 0) {
            total = total + Integer.parseInt(tmpStr.toString());
        }

        return total;
    }