title: regex VS Contains. Best Performance?
body: <p>I want to compare an URI String over different patterns in java and I want fastest code possible.</p>
  
  <p>Should I use : </p>
  
  <pre><code>if(uri.contains("/br/fab") || uri.contains("/br/err") || uri.contains("/br/sts")
  </code></pre>
  
  <p>Or something like :</p>
  
  <pre><code>if(uri.matches(".*/br/(fab|err|sts).*"))
  </code></pre>
  
  <p>Note that I can have a lot more uri and this method is called very often.</p>
  
  <p>What is the best answer between my choices ?</p>