I just want to use regex to determine if a string matches a pattern, but you know the saying "you decide to do regex, now you have two problems". A MWE would be
street _names = c("myrtle street", "poplar st", "oak road", "maple rd")
find_streets = function(street_name) {
str_detect(street, "st$") | str_detect(street, "street")
}
I remember hearing about a package that allows users to construct something like a regular expression, without worrying about writing a regex itself.