title: Regex Expression works fine in online testers, but not working on my page
body: <p>So I am reading a css file, and I want to get some data out of it. I currently trimmed down the data purely to this:</p>
  
  <pre><code>font-family: "Verdana";
  font-size: 14px;
  color: #000000;
  </code></pre>
  
  <p>and to purely get the data I need (namely Verdana, 14 and #000000), I created the following PHP code:</p>
  
  <pre><code>foreach($tmp as $tmpstr){
          if(strpos($tmpstr, "font-family")){
              $tmpres = array();
              preg_match('/\"(.*?)\"/', $tmpstr, $tmpres);
              $returnData["website"]["font-family"] = $tmpres[1];
          } else if(strpos($tmpstr, "font-size")){
              $tmpres2 = array();
              preg_match_all('/\:\s(.*?)px\;/', $tmpstr, $tmpres2);
              $returnData["website"]["font-size"] = $tmpres2[1];
          } else if(strpos($tmpstr, "color")){
              $tmpres3 = array();
              preg_match_all('/color\:\s(.*?)\;/', $tmpstr, $tmpres3);
              $returnData["website"]["font-color"] = $tmpres3[1];
          }
      }
  </code></pre>
  
  <p>I know it is not optimized yet, but the reason for that is, is that it isn't working. The first expression <code>'/\"(.*?)\"/'</code> to get Verdana works fine, but the other two (<code>'/\:\s(.*?)px\;/'</code> to get the font size, <code>/color\:\s(.*?)\;/</code> to get the font color) don't, whereas testing them in an online tester does seem to work. Can anyone tell me what I am doing wrong?</p>
  
  <p>Thanks!</p>