private void checkExpressionIsCorrect(String input) {
        String regex = "(\\s*\\d+\\s*[\\+\\-\\*\\/]\\s*){1,}\\d+\\s*";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(input);
        if (!matcher.matches()) {
            int failPosition = getFailPosition(pattern, input);
            throw new IllegalArgumentException(failPosition + "");
        }
    }