php - 求正则表达式
ringa_lee
ringa_lee 2017-04-10 18:10:07
0
1
684

<p class="quote"><p class="quote-hd"><span class="floor">第1楼</span>哈哈哈</p><p class="quote-bd"><p>ceshi</p><p><img src="public/js/ueditor143/dialogs/emotion/images/classic/007.gif"/></p></p></p>

我的正则,preg_match('/<p class='quote-hd'><span class='floor'>(.?)</span>(.?)</p><p class='quote-bd'>(.*?)</p>/is', $quote_content, $match);
取不到值。。。。
目标取出:
第1楼
哈哈哈
<p>ceshi</p><p><img src="public/js/ueditor143/dialogs/emotion/images/classic/007.gif"/></p>

ringa_lee
ringa_lee

ringa_lee

reply all(1)
伊谢尔伦
$s='<p class="quote"><p class="quote-hd"><span class="floor">第1楼</span>哈哈哈</p><p class="quote-bd"><p>ceshi</p><p><img src="public/js/ueditor143/dialogs/emotion/images/classic/007.gif"/></p></p></p>';

preg_match('#<p class="quote-hd"><span class="floor">(.*?)</span>(.*?)</p><p class="quote-bd">(.*?)</p>#is', $s, $match);
print_r($match);
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template