wildcard search and search term trim