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

<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

Antworte allen(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);
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage