Home > Backend Development > PHP Tutorial > 正则,提取视频路径,该如何解决

正则,提取视频路径,该如何解决

WBOY
Release: 2016-06-13 13:27:35
Original
868 people have browsed it

正则,提取视频路径
比如字符串

他可能是某篇文章中的一段而已末尾估计还有点东西


我想把上面的script提取出来,上文红色部分。
此外还想提取出script里面的视频参数,长、宽,路径。比如
550、400、http://player.56.com/v_NTYwMzg0MjA.swf

但是本人不懂正则,麻烦帮忙一下。

------解决方案--------------------

PHP code
$s=$('swf_6Z5').innerHTML=AC_FL_RunContent('width', '550', 'height', '400', 'allowNetworking', 'internal', 'allowScriptAccess', 'never', 'src', 'http://player.56.com/v_NTYwMzg0MjA.swf', 'quality', 'high', 'bgcolor', '#ffffff', 'wmode', 'transparent', 'allowfullscreen', 'true');末尾估计还有
html;
 preg_match_all("/<script.>/isU",$s,$m);
 print_r($m); <div class="clear">
                 
              
              
        
            </div></script.>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template