408の続き

$getHtml = "<img width="11" height="11" style="margin-right:11px;" border="1" src="http://aa.bb.cc/dd/ee/ff/gg/hh/down_r.gif" alt="ii"> 2.22</span><span id="jj">(3.33%)</span>";

$pattern = "";

if(preg_match($pattern, $getHtml, $matches))
{
   $pattern2 = "/<img.*?(down_r|down_g|up_r|up_g)\.gif/s";

   if(preg_match($pattern2, $matches[1], $matches2))
   {

   }

   if($matches2[1] == "down_r")
   {
      $matches2[1] = "down_g";
   }
   elseif($matches2[1] == "up_g")
   {
      $matches2[1] = "up_r";
   }

   $tmpString = $matches[2]."(".$matches[3].")";

   imageSave($values,$matches2[1],$tmpString,$flag5min);
}