title: java regex for UUID
body: <p>I want to parse a String which has UUID in the below format</p>
  
  <pre><code>"&amp;lt;urn:uuid:4324e9d5-8d1f-442c-96a4-6146640da7ce&amp;gt;"
  </code></pre>
  
  <p>I have tried it parsing in below way, which works, however I think it would be slow</p>
  
  <pre><code>private static final String reg1 = ".*?";
  private static final String reg2 = "([A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12})";
  private static final Pattern splitter = Pattern.compile(re1 + re2, Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
  </code></pre>
  
  <p>I am looking for a faster way and tried below, but it fails to match </p>
  
  <pre><code>private static final Pattern URN_UUID_PATTERN = Pattern.compile("^&lt; urn:uuid:([^&amp;])+&amp;gt");
  </code></pre>
  
  <p>I am new to regex.
  any help is appreciated.</p>
  
  <p>\Aqura</p>