title: Using preg_match to find all text between brackets
body: <p>I am trying to search a document for tags, to later replace them.</p>
  
  <p>I am using preg_match, but am having some difficulty.</p>
  
  <pre><code>preg_match('/\[.*\]/', $haystack, $matches);
  </code></pre>
  
  <p>Searching through the following text </p>
  
  <p>[TODAY_DATE]</p>
  
  <p>Re: Demand for Payment</p>
  
  <p>[ADDRESS]
  [ADDRESS_LINE_2]
  ...etc</p>
  
  <pre><code>print_r($matches);
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>Array ( [0] =&gt; [TODAY_DATE] )
  </code></pre>
  
  <p>How should I adjust my regex to return all matches?</p>