fixed regex search, added wildcard % if -R is specified (regex)