title: Spring Security antMatchers Regex
body: <p>I already have antmatchers() in my spring security config that uses a wildcard . I need to filter out the "forms" from this wildcard.
  Here is my original code : </p>
  
  <pre><code>    .antMatchers("/api/keepSessionAlive").authenticated()
      .antMatchers("/api/users/**").authenticated()
  </code></pre>
  
  <p>I tried to change the wildcard to a regex as you can see below and it didn't work for me :</p>
  
  <pre><code>   .antMatchers("/api/users/(?!forms).*").authenticated() 
  </code></pre>
  
  <p>Any help would be greatly appreciated </p>