vec = c("POP MUSIC", "TOP THE POPS", "POPEYE", "MARY POPPINS") grep("(?i)\\bPOPS?\\b", vec, value = TRUE)
Standard input is empty
[1] "POP MUSIC" "TOP THE POPS"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!