highlight matches of a pattern in a stream