I am receiving data from a server in the following format:
gin1601 DepthOfBook<
Something like this would work:
sed -e 's/<\/sessionId>/<\/sessionId>\n/g' | sed -n 's/.*\([^<]*\)<\/sessionId>.*/\1/p'
First part is because sed tries to eat up as much of a single line as possible when matching, this will find all sessionId
occurences and split them up on a line on its own.
Next part matches stuff between the sessionId
tags.