adding regex logic in the search