console.log( "Extract all words but word1 and word2.".match(/\b(?!(?:word1|word2)\b)\w+/g))
Standard input is empty
Extract,all,words,but,and
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!