php从数组中获取2个不同的$字符串

Here is my problem

preg_match_all('#get something#smi',$data,$get);
$get=$get[0];
$bulsay=count($get)-1;
for ($i=0;$i<=$bulsay;$i++){
preg_match_all('#<img src="http://someurl.com/demo/(.*?)"#smi',$get[$i],$vidid);
}

That $vidid is getting 12 ID, but some id are like this

14/07/12/321312491244.jpg

11/07/24/47311532132-0000.png

6 with JPG and 6 with png

that with the jpg is easy to replace for the video id

like this

141121/022227/22121/321312491244.mp4

but this with png need to be edited like this

11222/0742121/2323224/8_47311532132.flv

i try to get only the png urls like this

preg_match_all('#(.*?)-0000.png#smi',$vidid[$i],$png);
 $png=$png[1][0];

after

print_r($png);

i have 6 array and 6 with 11/07/24/47311532132

how can i get only the 6 with 11/07/24/47311532132

???

I try with if eregi png but it gives me the another 6 too

no idea how to fix

i did it by my self :)

here how i do it

After i get $vidid

if (!strstr($vidid[$i], "jpg")){
 $pngid=$vidid[$i];
     $videoid = substr("$pngid", 0, -9);

}
else {
     if (!strstr($vidid[$i], "png"))
    $videoid=$vidid[$i];
    $videoid = substr("$videoid", 0, -4);

}

echo "<pre>";
print_r($videoid);

there i have a clear png and jpg from my $string!