stringr equivalent to grep
Sorry for the late answer but it might be helpful for future visitors:
Now you can use str_which(string, pattern)
which is a wrapper around which(str_detect(string, pattern))
and equivalent to grep(pattern, string)
.
str_which(LETTERS, "F|Y")
[1] 6 25
More details at: http://stringr.tidyverse.org/reference/str_subset.html