title: How to match with two regex Expression?
body: <p>I should check if that string is valid. So i can i check UUID parts with this regex expression</p>
  
  <pre><code>private String UUID = "([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})"
  
  private String url = "customers/00000000-0000-0000-0000-000000000111/areas/00000000-0000-0000-0000-000000000222/orders/00000000-0000-0000-0000-000000000555/invoices/00000000-0000-0000-0000-000000000777/employees/2018-10-31T00:27:31.205+0000.jpg"
  </code></pre>
  
  <p>like this</p>
  
  <pre><code>Pattern JPG_PATTERN = Pattern.compile(
              String.format("customers/%s/areas/%&lt;s/orders/%&lt;s/invoices/%&lt;s/employees/", UUID));
  
  Matcher m = JPG_PATTERN.matcher(url);
  
  if (m.find()) {
  System.out.println("found);
  }
  </code></pre>
  
  <p>But when i add another regex to check last part of the string. It doesn't work.</p>
  
  <pre><code>private String EXTENSION = "(?:mov|jpg)";
  
   Pattern JPG_PATTERN = Pattern.compile(
                  String.format("customers/%s/areas/%&lt;s/orders/%&lt;s/invoices/%&lt;s/employees/%s", UUID, EXTENSION));
  
      Matcher m = JPG_PATTERN.matcher(url);
  
      if (m.find()) {
      System.out.println("found);
      }
  </code></pre>
  
  <p>How can use these two apart regex expression and check if the string is valid?</p>