多くのテキスト/画像を含むブログ エントリがあり、そのブログから抜粋したいと考えています。より具体的には、2番目の画像タグの後まですべてを一致させたい
以下はサンプルテキストです。
私は次のような否定的な先読みを試しました
/[\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>