title: Get the second match by regex
body: <p>I want to get the second occurrence of the matching pattern (inside the brackets) by using a regex.
  Here is the text </p>
  
  <pre><code>[2019-07-29 09:48:11,928] @hr.com [2] [AM] WARN
  </code></pre>
  
  <p>I want to extract <strong>2</strong> from this text.I tried using</p>
  
  <pre><code>(?&lt;Ten ID&gt;((^)*((?&lt;=\[).+?(?=\]))))
  </code></pre>
  
  <p>But it matches <strong>2019-07-29 09:48:11</strong>,<strong>928</strong> , <strong>2</strong> , <strong>AM</strong>.
  How to get only <strong>2</strong> ?</p>