private void processGroup(final Group node,
                              final Buffer buffer,
                              final Match parentMatch,
                              final int parentMatchCount,
                              final int level) throws IOException, SAXException {
        // Pull back the stored value.
        Buffer subBuffer = node.lookupValue(parentMatchCount);
        if (subBuffer != null) {
            if (node.isReverse()) {
                // Create a buffer that will return characters in reverse.
                subBuffer = subBuffer.reverse();
            } else {
                // Create a copy of the buffer so that subsequent processing,
                // moves etc will not affect the original buffer.
                subBuffer = subBuffer.unsafeCopy();
            }

            // Process the sub buffer with sub expressions.
            process(node,
                    subBuffer,
                    null,
                    parentMatchCount,
                    level + 1,
                    node.getMatchOrder(),
                    node.isIgnoreErrors());

            // Make sure we consumed all of the sub buffer (ignoring trailing
            // whitespace).
            if (!node.isIgnoreErrors() && !subBuffer.isBlank()) {

                messageBuffer.clear();
                messageBuffer
                        .append("Expressions failed to match all of the content provided by group: ")
                        .append(node.getDebugId())
                        .append(" unmatched content: [");

                appendBufferContents(messageBuffer, subBuffer);

                messageBuffer.append("]");

                log(Severity.ERROR, messageBuffer.toString());
            }
        }
    }
Store data against a node for future retrieval by this node or by remote
reference from another node in the case of var elements.
stroom-pipeline/src/main/java/stroom/pipeline/xml/converter/ds3/DS3Parser.java