<?php
$text="<p>good<img src=\"http://img.baidu.com/hi/tsj/t_0037.gif\" /></p><p><img src=\"http://uppic.b0.upaiyun.com/2013/5/5/1367741844238814.png_440\" style=\"float:none;\" /></p><p><img src=\"http://uppic.b0.upaiyun.com/2013/5/5/1367741858405222.png_440\" style=\"float:none;\" /></p><p>test</p><p><img src=\"http://img.baidu.com/hi/tsj/t_0036.gif\" /></p><p>good</p><p><br /></p>";
$text=stripslashes($text);
//正则
$preg = "|<img src=\"(http:\/\/uppic.b0.upaiyun.com.+?)\".*?>|"; preg_match_all($preg,$text,$res); print_r($res[1]);die;// 结果是:Array ( [0] => http://uppic.b0.upaiyun.com/2013/5/5/1367741844238814.png_440 [1] => http://uppic.b0.upaiyun.com/2013/5/5/1367741858405222.png_440 ) ?>

 

相关文章:

  • 2022-12-23
  • 2021-04-11
  • 2021-10-08
  • 2021-04-17
  • 2022-02-09
  • 2022-12-23
猜你喜欢
  • 2021-07-11
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-08
相关资源
相似解决方案