title: Replace characters except certain strings with gsub
body: <p>I'm trying to replace characters in a column that do <strong>not</strong> match the pattern in a <code>gsub</code> function.</p>
  
  <p>data column:</p>
  
  <pre><code>library(tidyverse)
  
  df &lt;- structure(list(partij_kort = c("COMBGB", "VVD", "GL", "NIEUWEL", 
  "CDA")), .Names = "partij_kort", row.names = c(NA, -5L), class = c("tbl_df", 
  "tbl", "data.frame"))
  
    partij_kort
    &lt;chr&gt;      
  1 COMBGB     
  2 VVD        
  3 GL         
  4 NIEUWEL    
  5 CDA 
  </code></pre>
  
  <p>This code does the opposite what I want:</p>
  
  <pre><code>df %&gt;% mutate(new = gsub("VVD|GL|CDA|CU|D66|PVDA|CUSGP|SGP|PVDAGL",
                           "something",
                           partij_kort))
  
    partij_kort new      
    &lt;chr&gt;       &lt;chr&gt;    
  1 COMBGB      COMBGB   
  2 VVD         something
  3 GL          something
  4 NIEUWEL     NIEUWEL  
  5 CDA         something
  </code></pre>
  
  <p>I want every string that's <strong>not</strong> in that pattern (<code>COMBGB</code> and <code>NIEUWEL</code>) to change in <code>something</code>.</p>
  
  <p>But the exclamtion mark <code>!</code> doesn't work with gsub (I use it a lot with grepl).</p>
  
  <p>Desired outcome:</p>
  
  <pre><code>  partij_kort new      
    &lt;chr&gt;       &lt;chr&gt;    
  1 COMBGB      something
  2 VVD         VVD      
  3 GL          GL       
  4 NIEUWEL     something
  5 CDA         CDA 
  </code></pre>
  
  <p>What's the best way to do this?</p>