fork download
  1. text <- 'Extract all words but word1 and word2.'
  2. regmatches(text, gregexpr("(*UCP)\\b(?!(?:word1|word2)\\b)\\w+", text, perl=TRUE))
Success #stdin #stdout 0.22s 39768KB
stdin
Standard input is empty
stdout
[[1]]
[1] "Extract" "all"     "words"   "but"     "and"