title: PHP Preg Match All but Others Being Returned
body: <p>I am trying to locate all matching strings in my content with preg_match_all() but it is returning some random results.</p>
  <p>Here's my content:</p>
  <pre><code>This is my content but it is completely dynamic...
  [[hello_world]]
  [[hello-world]]
  [[hello world]]
  </code></pre>
  <p>I am wanting to only return this: [[hello_world]]</p>
  <pre><code>preg_match_all('/[[[a-z0-9_]+?]]/', $content, $matches);
  </code></pre>
  <p>but it is returning this:</p>
  <pre><code>0 =&gt; &quot;[[hello_world]]&quot;
  1 =&gt; &quot;world]]&quot;
  2 =&gt; &quot;world]]&quot;
  </code></pre>
  <p>I am wanting to only return this: [[hello-world]]</p>
  <pre><code>preg_match_all('/[[[a-z0-9-]+?]]/', $content, $matches);
  </code></pre>
  <p>but it is returning this:</p>
  <pre><code>0 =&gt; &quot;world]]&quot;
  1 =&gt; &quot;[[hello-world]]&quot;
  2 =&gt; &quot;world]]&quot;
  </code></pre>
  <p>I am wanting to only return this: [[hello world]]</p>
  <pre><code>preg_match_all('/[[[a-z0-9 ]+?]]/', $content, $matches);
  </code></pre>
  <p>but it is returning this:</p>
  <pre><code>0 =&gt; &quot;world]]&quot;
  1 =&gt; &quot;world]]&quot;
  2 =&gt; &quot;[[hello world]]&quot;
  </code></pre>
  <p>Thanks for the help!</p>