Search for multiple string patterns in R

make a string pattern vector, then search for strings by combining patterns with OR operator

library(dplyr)
library(stringr)
string_patterns <- c("stringpattern1", "stringpattern2")
df %>% filter ( str_detect ( col_with_strings, paste ( string_patterns, collapse = '|' )))