src/main/java/com/basistech/tclre/Compiler.java
private String scanplain() throws RegexException {
        int startp = now;
        int endp;

        assert see(COLLEL) || see(ECLASS) || see(CCLASS);
        lex.next();

        endp = now;
        while (see(PLAIN)) {
            endp = now;
            lex.next();
        }

        String ret = new String(pattern, startp, endp - startp);
        assert see(END);
        lex.next();

        return ret;
    }
private String scanplain() throws RegexException {
        int startp = now;
        int endp;

        assert see(COLLEL) || see(ECLASS) || see(CCLASS);
        lex.next();

        endp = now;
        while (see(PLAIN)) {
            endp = now;
            lex.next();
        }

        String ret = new String(pattern, startp, endp - startp);
        assert see(END);
        lex.next();

        return ret;
    }
scanplain - scan PLAIN contents of [. etc.
Certain bits of trickery in lex.c know that this code does not try
to look past the final bracket of the [. etc.

@return the string. It can't return a pos; a nested pattern is popped by
the last lex.next() in here and so the offsets don't work.