Hi, since not strong in regulars, I appeal to you. Help please, pull out the value file and image

Куча HTML кода <embed src="http://www.site.com/mp3/bia2player.swf" width="635" height="380" allowfullscreen="true" allowscriptaccess="always" flashvars="&amp;file=http://static.site.com/mp3/Tanbalim-Tanbe10_ft_Justina(www.site.com).mp3&amp;height=380&amp;image=http://static.site.com/images/mp3/player/cover_tanbalim_large.jpg&amp;width=635&amp;frontcolor=0xFFFFFF&amp;backcolor=0x000000&amp;lightcolor=0x00CCCC&amp;showeq=true&amp;autostart=true&amp;repeat=true"> Куча HTML кода 

    1 answer 1

     <? $str = '<embed src="http://www.site.com/mp3/bia2player.swf" width="635" height="380" allowfullscreen="true" allowscriptaccess="always" flashvars="&amp;file=http://static.site.com/mp3/Tanbalim-Tanbe10_ft_Justina(www.site.com).mp3&amp;height=380&amp;image=http://static.site.com/images/mp3/player/cover_tanbalim_large.jpg&amp;width=635&amp;frontcolor=0xFFFFFF&amp;backcolor=0x000000&amp;lightcolor=0x00CCCC&amp;showeq=true&amp;autostart=true&amp;repeat=true">'; preg_match("/file=([-a-zA-Z:;\/\.\d_()]*)/",$str,$file); preg_match("/image=([-a-zA-Z:;\/\.\d_()]*)/",$str,$image); echo $file[1]."<br>"; echo $image[1]."<br>"; ?> 
    • This is more for this particular case. Ideally, you need to know which characters are generally possible in the values ​​file and image. :-) PS I love regulars. :-) - Angelina_Jo
    • one
      Regulars I will bring you instead of chocolates :) - Yoharny Babay