title: What is the proper regex syntax for a IIS URL Rewrite rule where a URL does NOT contain a string?
body: <p>I am trying to write a regex Expression for the IIS 8.0 URL Module where:</p>
  
  <p>(the URL <em>is</em> <strong>/en</strong>
  <em>OR</em>
  the URL starts with <strong>/en/</strong>)
  <em>AND</em> 
  the URL does <strong><em>NOT</em></strong> contain <strong>switchLanguage=true</strong>)</p>
  
  <p>I have the following rule in my web.config...</p>
  
  <pre><code>&lt;rule name="Remove Default Language" stopProcessing="true"&gt;
      &lt;match url="(^en$|^en/(.*)$)(?&amp;lt;!switchLanguage=true(.*))" /&gt;
      &lt;conditions&gt;
      &lt;/conditions&gt;
      &lt;action type="Redirect" url="{R:1}" /&gt;
  &lt;/rule&gt;
  </code></pre>
  
  <p>... but this causes a 500.52 error to be thrown with a message that the match syntax is not valid.</p>
  
  <p>Any help would be greatly appreciated.</p>