fork download
  1. object Main extends App {
  2. val text = "Extract all words but word1 and word2."
  3. println( """\b(?!(?:word1|word2)\b)\w+""".r.findAllIn(text).toList )
  4. }
Success #stdin #stdout 0.67s 67788KB
stdin
Standard input is empty
stdout
List(Extract, all, words, but, and)