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

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

Jun 13, 2016 pm 01:27 PM
lt quot script

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

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


我想把上面的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
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What does script mean? What does script mean? Aug 29, 2023 pm 02:00 PM

Script means script or script. In film, television, drama and other art forms, script is used to describe the dialogue, actions and scenes of characters, as well as the development and structure of the story. Script writing requires certain skills and experience, and it should be vivid and powerful, capable of attracting the audience's attention and conveying the emotions and themes of the story. Scripts are particularly important in the film and television industries. They are the basis of creation and determine the storyline, character development and dialogue content of the film. Script is an important tool for artists to create and express themselves.

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

what is script what is script Oct 12, 2023 am 10:04 AM

In the field of computer science, "script" usually refers to a scripting language or script file. A scripting language is an interpreted programming language commonly used for tasks such as automation, batch processing, and rapid prototyping.

How to solve scripterror How to solve scripterror Oct 18, 2023 am 09:44 AM

Solutions to scripterror include checking syntax, file path, checking network connection, browser compatibility, using try-catch statements, using developer tools for debugging, updating browsers and JavaScript libraries, or seeking professional help. Detailed introduction: 1. Check for syntax errors: Script Error may be caused by syntax errors in JavaScript code. Use developer tools to check the code and fix syntax errors. Make sure that the brackets, quotation marks, semicolons, etc. in the code are correct. etc.

Is script a css tag? Is script a css tag? Mar 01, 2021 am 10:23 AM

script is not a css tag, but a tag in HTML. This tag is used to define client-side scripts, such as JavaScript; the script element can either contain script statements or point to external script files through the src attribute. The syntax is "<script>// code</script>" or "<script src="script file address"></script>".

Microsoft is rolling out Windows 11 23H2 build to the release preview channel with Copilot Microsoft is rolling out Windows 11 23H2 build to the release preview channel with Copilot Sep 28, 2023 pm 07:17 PM

Everyone is looking forward to today's Windows 1123H2 release. In fact, Microsoft has just launched updates to the release preview, which is the closest channel before the official release stage. Known as Build 22631, Microsoft said they are rolling out the new rebranded chat app, phone link, and play together widgets that have been tested on other internal channels over the past few months. "This new update will have the same servicing branch and codebase as Windows 11 version 22H2 and will be cumulative with all newly announced features, including Copilot in Windows (preview)," Microsoft promises. Redmond officials further

Where is the script tag usually written in HTML? Where is the script tag usually written in HTML? Sep 16, 2022 pm 04:20 PM

The position of the script tag: 1. Place it inside the head tag. The browser parses the HTML. When parsing the script tag, it will first download all the scripts and then parse other HTML; therefore, the web content will be rendered lagging and the user experience will be poor. . 2. If placed inside the body tag, the browser will first parse the entire HTML page, and then download and parse the js. 3. After the body closing tag, the browser will ignore the previous "</body>", so the actual effect is no different from writing it before the body closing tag.

What packages does jQuery need to import? What packages does jQuery need to import? Feb 23, 2024 am 10:30 AM

jQuery is a JavaScript library widely used in web development, which simplifies the complexity of tasks such as manipulating HTML elements, event handling, animation effects, and AJAX. Before using jQuery, you need to correctly import the jQuery library into your web page so that you can use the various functions it provides in your code. To import jQuery, you can do this in a few different ways: Import jQuery using a CDN (Content Delivery Network) link

See all articles