title: preg_match quantifier does not work PHP 5.5
body: <p>Hi i'm trying to use this pattern <code>/^(–*\s*2\.2\.|2\.2\.)/</code>  to match this strings, each line is a different string.
  <strong>EDIT</strong> sorry about the poor data formating</p>
  
  <pre><code>&lt;?php
   $final_texts=array();
   $pattern='/^(–*\s*2\.2\.|2\.2\.)/';//this is generated automatically elsewhere btw
   $texts = array(
   "– 2.2.04 R",
   "–– 2.2.04.10 C",
   "–– 2.2.04.1 CO",
   "–– 2.2.04.2 CO",
   "–– 2.2.04.3 CO",
   "–– 2.2.04.4 CO",
   "–– 2.2.04.5 CO",
   "–– 2.2.04.6 CO",
   "–– 2.2.04.7 CO",
   "–– 2.2.04.8 CO",
   "–– 2.2.04.9 CO",
   "foooooooooooo",
   "barrrrrrrrrr",
   "-- foobar",
   "- 1123",
   );
   foreach($texts as $key=&gt;$text){    
      if(preg_match($pattern, $text)){
          $final_texts[]=$text;
      }
    }
   print_r($final_texts); ?&gt;
  </code></pre>
  
  <p>This is what i'm using <code>preg_match($pattern, $string)</code>
  As i Understand it * means 0 or more of the former, but i'm no expert .</p>
  
  <p>But only matches the first string and not the ones with more than one dash "–" keep in mind that they are different string inside an array and i iterate over it to do something. should i be doing something different in the pattern, i'm trying to match all strings that start with any amount of dashes and spaces follwed by the <strong>2.2.</strong> string. And I will have this problem with other numbers, and i may have strings with more than 2 dashes in the future so i don't see how can i solve this not using regex
  i've allready test it here <a href="http://preg_match.onlinephpfunctions.com/" rel="nofollow">http://preg_match.onlinephpfunctions.com/</a> and have the same problem.
  <a href="https://eval.in/177489" rel="nofollow">demo</a> thanks to @hwnd for showing me this!</p>