trim the search keyword