Try this pseudo code:
char [] start = {'<','|','s','t','a','r','t','|','>' }; char [] start = {'<','|','e','n','d','|','>' }; char [] buff = new char[9]; while( true ) { char c = readChar(); if( c == '<' ) { buff = readChars( 9 ) ; if( buff == start ) { inside = true ; skip( 9 ); // start } else if( buff == end ) { inside = false; skip(7); // end } } if( inside ) { print( char ) ; } }
The idea is to read until you find the marker and raise the flag, when the flag is on, you print the value, if you find the final token, you end the flag.
There must be several ways to encode the previous pseudocode. I will update this answer later.
source share