added regex X and Y function for search query