added regex unit tests for the search algorithm