You can cycle through a list or vector of genres, as below:
genres <- c("Action",...,"Western")
sapply(genres, function(x) grepl(x, my_text))
To answer your question, if you just want to know if any
element of the result is TRUE you can use the any()
function.
any(sapply(genres, function(x) grepl(x, my_text)))
Quite simply, if any element of is TRUE, any
will return TRUE.