protected boolean sequenceDetected(ICharacterScanner scanner, char[] sequence, boolean eofAllowed) {
boolean result = super.sequenceDetected(scanner, sequence, eofAllowed);
CharacterScannerWrapper scannerWrapper = new CharacterScannerWrapper(scanner);
scannerWrapper.unread();
if (result && new String(sequence).equals(_endSequence)) {
scannerWrapper.unread();
char c = (char)scannerWrapper.read();
StringBuffer readSoFar = new StringBuffer();
readSoFar.append(c);
while (!readSoFar.toString().endsWith(reverse(_startSequence))) {
scannerWrapper.unread();