title: How to fix the Sonar critical issue on Pattern.compile(regex, Pattern.CASE_INSENSITIVE);
body: <p>I'm getting a critical sonar issue "<em>Using regular expressions is security-sensitive</em>" when using the code </p>
  
  <pre><code>Pattern.compile(regex, Pattern.CASE_INSENSITIVE)
  </code></pre>
  
  <p>Can anyone help to fix this? Is there any alternatives available for this?</p>