Home > Backend Development > PHP Tutorial > 正则匹配<script></script>里的内容。内容里包括空白和任意字符

正则匹配<script></script>里的内容。内容里包括空白和任意字符

WBOY
Release: 2016-06-23 14:15:57
Original
1491 people have browsed it

正则匹配<script></script>里的内容。内容里包括空白和任意字符 preg_match


回复讨论(解决方案)

preg_match('/<script>(.+?)<\/script>/is',$s,$m); <br /> echo $m[1]; </script>

preg_match('/<script>(.+?)<\/script>/is',$s,$m); <br /> echo $m[1]; <br /> 非常感激! </script>

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