我有一个博客条目,有时会包含很多文本/图像,我想从该博客中截取一段。更具体地说,我想匹配所有内容,直到第二个图像标签之后
下面是一些示例文本。
我尝试过像这样的负面预测
/[\w\r\n;:',."&\s*<>=-_]+(?!<img)/i
但我想不出一种方法将前瞻应用于“+”修饰符。谁有任何线索,我将不胜感激。
*override*
I've been stuck in a room lately, and though it's hard to stay creative all the time, sometimes you need that extra kick. Well for some us we have to throw pictures of true creative genius at ourselves to stimulate us.
So sit back and soak in some inspiration I've come across the past year.
<figure>
<a href="">
<img class="aligncenter" src="http://funnypagenet.com/wp-content/uploads/2011/07/Talesandminimalism_12_www.funnypagenet.com_.jpg" alt="" width="574" height="838" />
</a>
<figcaption></figcaption>
</figure>
<h4 style="text-align: center;">
<a href="http://funnypagenet.com/tales-and-minimalism/">source</a>
</h4>
Couldn't find who did this, but couldn't explain the movie any simpler
<figure>
<img class="aligncenter" src="http://brickhut.files.wordpress.com/2011/05/theempirestrikesback1.jpg" alt="" width="540" height="800" />
<figcaption></figcaption>
</figure>