title: preg_match returns identical elements only once
body: <p>I am going through a string and proces all the elements between !-- and --!. But only unique elements are processes. When I have !--example--! and a bit further in the text also !--example--!, the second one is ignored. </p>
  
  <p>This is the code:</p>
  
  <pre><code>while ($do = preg_match("/!--(.*?)--!/", $formtext, $matches)){
  </code></pre>
  
  <p>I know about preg_match_all, but need to do this with preg_match. </p>
  
  <p>Any help? Thanks in advance!</p>