title: how to match header location response with regular expression using rest-assured
body: <p>I was making a rest-assured test for testing url redirects using testng. I would like to match header location response to match with regular expression. </p>
  
  <p>I am trying to create following method but I didn't find any regular expression matcher using Hamcrest matcher. I would like to use some method like matches (or if any other option) as used in the method.</p>
  
  <pre><code>public Response matchRedirect(String url, Integer statusCode, String urlRegex) {
          return  
          given().
                  redirects().follow(false).and().redirects().max(0).
           expect(). 
                   statusCode(statusCode). 
                   header("Location", **matches**(urlRegex)). 
           when().get(url); 
  }
  </code></pre>