title: Regex to extract the content inside [squarebrackets] but not [[wiki-links]]
body: <p>I'm looking for a regex that could match and extract the content inside <code>[squarebrackets]</code> but not inside <code>[[wiki-links]]</code>. So for the example above, I would extract only the <code>squarebrackets</code> part, but not <code>[squarebrackets]</code>, <code>[wiki-links]</code>, or <code>wiki-links</code>.</p>
  <p>Currently, I found two regexes:</p>
  <ol>
  <li>Extracts the content inside [[wiki-links]] only (and not [squarebrackets]):</li>
  </ol>
  <pre><code>/[^[\]]+(?=]])/g
  </code></pre>
  <ol start="2">
  <li>Extracts the content inside both [[wiki-links]] and [squarebrackets]:</li>
  </ol>
  <pre><code>\[[^\[\]]+\]/g
  </code></pre>
  <p>The 2nd one is close to what I want, but it still includes the squarebrackets themselves and catches [[wiki-links]] content which I don't want.</p>
  <p>How could I exclude those by modifying the regex expression, so that I only get the content inside the single squarebrackets, without the brackets themselves?</p>
  <p>Thank you!</p>