1. filter the text and remove the ansi color code