static int getLoopNumber(StringBuilder text, int offset) {
        Matcher matcher = LOOP_NUMBER_PATTERN.matcher(text);
        matcher.find();

        return Integer.valueOf(matcher.group(1));
    }