find whether the substring in string exist or not in r? code example Example: checking if a substring exists in a string r grepl(regex, string_to_search)