Added regEx functionality for search input check