Remove ANSI sequence from the captured output lines