private void handleComplexRegexException(final ComplexRegexException e, Expression expression) {
        messageBuffer.clear();
        messageBuffer.append("Regex Expression '")
                .append(expression.getDebugId())
                .append("' is too complex to process with the input data. ")
                .append("This may be due to repetitive alternative paths, e.g. '(A|B)*', ")
                .append("in which case consider changing the pattern to use possessive quantifiers.");
        final Matcher matcher = e.getMatcher();
        if (matcher != null) {
            final int len = matcher.regionEnd() - matcher.regionStart();
            messageBuffer.append(" Pattern '")
                    .append(matcher.pattern())
                    .append("'.")
                    .append(" Input data region [")
                    .append(matcher.regionStart())
                    .append(",")
                    .append(matcher.regionEnd())
                    .append("] (length " + len + ").");
        }
        final String message = messageBuffer.toString();
        log(Severity.ERROR, message, e);
    }
Outputs a data element if required using the current match or another
stored match.
stroom-pipeline/src/main/java/stroom/pipeline/xml/converter/ds3/DS3Parser.java