title: Reverse or invert regex matches
body: <p>I have seen and read several posts about negative matching, i.e. using a "not" operator, but I am looking for something slightly different. I would like to match and replace, but using a "reversed selection" for it.</p>
  
  <p>I'll use a metaphor to try and explain:</p>
  
  <p>Think of a word processing document. When you use "search and replace" you can in some software get highlights for all matches in the document. With regex, this would of course be the matches, and I could replace them with anything I please. BUT what if I want to replace <em>everything else</em> with some phrase. </p>
  
  <p>Imagine I have a list of allowed words, which for the sake of simplicity right now contains only one word which is "and" (I'm very picky) and I want to replace everything that is not an allowed word with the string "(censored)".</p>
  
  <p>If the input is "I am nice and friendly and I like to wear ninja outfits" then the output should be "(censored) and (censored) and (censored)".</p>
  
  <p>The question is of a general nature, but I mainly use C# myself and if I get to implement this, it will most likely be using Regex in C#.</p>