title: Match entire line, group all occurrences of a sequence and everything inbetween
body: <p>Let's take this line for example:</p>
  <p><code>This is a [13125] string and [9414] it's long. [123897] it's longer [38153] than an average [73941].</code></p>
  <p>How do I match entire line and group every occurence of <code>[number]</code> and everything in between?</p>
  <p>I have this regex so far: <code>/(.*)(\[\d*\])(.*)/</code>. It works as intended but only groups the last occurrence of <code>[number]</code>. I want it to do something like this:</p>
  <pre><code>Group 1: This is a 
  Group 2: [13125]
  Group 3:  string and 
  Group 4: [9414]
  ...
  </code></pre>