fork download
  1. text = 'Extract all words but word1 and word2.'
  2. p text.scan(/\b(?!(?:word1|word2)\b)\w+/);
Success #stdin #stdout 0.01s 6380KB
stdin
Standard input is empty
stdout
["Extract", "all", "words", "but", "and"]