character based parsing and text snippet output