title: Regex-function adds second occurance of pattern to first one
body: <p>The <code>preg_match_all()</code>-function should find all occurances of this <code>/\]\(.*.md\)/</code>-Expression, it does, but somehow it detects multiple matches just as one.
  My input looks like this:</p>
  
  <pre><code>[example](foo/random/link.md) | [example2](other/some.md)
  Lorem ipsum.....
  [example3](foo/Readme.md)
  </code></pre>
  
  <p>It should match the three <code>examples</code>-links. But it returns:</p>
  
  <pre><code>Array[0] -&gt; ](foo/random/link.md) | [example2](other/some.md)
  Array[1] -&gt; ](../Readme.md)
  </code></pre>
  
  <p>Although <code>example2</code> should also be found. I am quite confident it is a problem with the use of <code>.*</code>, but I was not able to come up with something better.</p>
  
  <p>P.S.: For better understanding. I am writing a php-script that translates links from markdown docs to links that are relative to the php-scripts position in the filesystem.</p>