Wordpress で生成されたデータベースから取得したテキストの文字列から html を削除しようとしています。
これ欲しい:
Marnie Stanton led us through the process first and then everyone went crazy.
[caption id="attachment_76" align="alignnone" width="191"] One of the work stations[/caption]
[caption id="attachment_78" align="alignnone" width="300"] The group is getting some great results[/caption]
[caption id="attachment_83" align="alignnone" width="224"] You can see the prints multiplying[/caption]
これに変わります:
Marnie Stanton led us through the process first and then everyone went crazy.
だから私が欲しいのは、最初[caption]
から最後まですべてを[/caption]
削除することです。
私はこれから始めました:
(\[caption\s+?[^]]+\])
最初のタグのみを削除します。