powered by
string
pattern
str_locate(string, pattern)
regex
fixed
regexpr
str_extract for a convenient way of extracting matches str_locate_all to locate position of all matches
str_extract
str_locate_all
fruit <- c("apple", "banana", "pear", "pinapple") str_locate(fruit, "a") str_locate(fruit, "e") str_locate(fruit, c("a", "b", "p", "p"))
Run the code above in your browser using DataLab