title: An invalid regex pattern
body: <p>I have a piece of code in c# that checks, if a value is a valid regex pattern.</p>
  <p>Code is straight forward:</p>
  <pre><code>   try
     {
        System.Text.RegularExpressions.Regex.IsMatch(&quot;&quot;, pattern);
     }
     catch (Exception ex)
     {
         return &quot;pattern matches must be a valid regex value&quot;;
     }
  </code></pre>
  <p>I'm trying to test if it works correctly, but I can't find an invalid regex pattern.</p>
  <p>Any suggestions?</p>