title: Nginx config: match everything except for multiple extensions
body: <p>I am wanting to cache all files except for "php", "phtml" and "html". After some research, I put this together to attempt it the best I could:</p>
  
  <pre><code>location ~ .+(?&lt;!\.(php|phtml|html))$ {
          expires 336h;
          add_header Pragma public;
          add_header Cache-Control "public, must-revalidate, proxy-revalidate";
  }
  </code></pre>
  
  <p>But Nginx config test fails with this:</p>
  
  <pre><code>nginx: [emerg] pcre_compile() failed: lookbehind assertion is not
  fixed length in ".+(?&lt;!\.(php|html|phtml))$" at ")$" in
  /etc/nginx/sites-enabled/default:19
  </code></pre>
  
  <p>Elsewhere I have php, phtml, and html set to not cache. That is working fine.</p>
  
  <p>Places that almost got me there:</p>
  
  <p><a href="https://serverfault.com/a/334871/117054">https://serverfault.com/a/334871/117054</a></p>
  
  <p><a href="https://stackoverflow.com/a/26722906/508558">https://stackoverflow.com/a/26722906/508558</a></p>