Home > Backend Development > PHP Tutorial > 求个P标签的正则匹配,匹配第一段的内容

求个P标签的正则匹配,匹配第一段的内容

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-23 13:45:22
Original
2587 people have browsed it

$body = '



云南开远铁路处从一起


  近日,正全力寻找孩子的亲生父母。如认出视频中的孩子,请联系开远铁路公安处:0873-3132158。


  日前,查,辗转多地,在济南、南昌铁路警方和云南、福建、山东等地公安机关的协助下,成功侦破一拐卖儿童案。


';
preg_match_all("/

]*>([^\]*)/is",$body,$matchs1);
print_r($matchs1);
?>

希望输出


回复讨论(解决方案)

$body = '<p align="center"><embed height="410" type="application/x-shockwave-flash" width="500" src="http://video.dispatch.tc.qq.com/84337179/n0140r44e27.flv?vkey=5D13B801B9975D58A2C089B3A54AEA6963C71C0C6643EBB28FC92838F3A0C58DB271C16009584E5CB6C7DF7113A11BE1624074BBB6186068" allowscriptaccess="always" quality="high" /></p><p align="center">云南开远铁路处从一起</p><p>  近日,正全力寻找孩子的亲生父母。如认出视频中的孩子,请联系开远铁路公安处:0873-3132158。</p><p>  日前,查,辗转多地,在济南、南昌铁路警方和云南、福建、山东等地公安机关的协助下,成功侦破一拐卖儿童案。</p>';preg_match_all("/<embed[^>]+?>/is",$body,$matchs1);echo "<pre class="brush:php;toolbar:false">";print_r($matchs1[0][0]);echo "
Copy after login
";/**/

preg_match_all("/

]*>\s*.*\s*/isU",$body,$matchs1);

preg_match("/]+>/is",$body,$matchs1);
print_r($matchs1);

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