trim the search value