fork download
  1. txt1 = "quiz.1.player.chat_results"
  2. txt2 = "partner_quiz.1.player.chat_results"
  3. txt3 = "test1 quiz.1.player.chat_results test2"
  4. pattern = "\\b(?!partner)quiz\\.[1-5]\\.player\\S*"
  5.  
  6. regmatches(txt1,regexpr(pattern,txt1, per=TRUE))
  7. regmatches(txt2,regexpr(pattern,txt2, per=TRUE))
  8. regmatches(txt3,regexpr(pattern,txt3, per=TRUE))
Success #stdin #stdout 0.24s 185728KB
stdin
Standard input is empty
stdout
[1] "quiz.1.player.chat_results"
character(0)
[1] "quiz.1.player.chat_results"