names <- c("plan_x_template", "plan_x")grep("^plan(?!.*template)", names, value = TRUE, perl = TRUE)
Standard input is empty
[1] "plan_x"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!