Grepl is an R function that searches for matches to argument pattern within each element of a character vector.
A function/method that returns part of a string
|Operation slightly better||
"Finally i also made a benchmark test which shows that substr operation is slightly better than sapply grepl and significantly better than vectorised grepl alone"
from question "How to avoid the loops in a specific multiple conditional statement in R"