0

How can I write a pattern, in PHP so that I can find these variations, which are scattered throughout text coming from the database

<div id="attachment_38847" style="width: 1610px" class="wp-caption alignnone"><img src="http://test.com/wp-content/uploads/2016/12/224157043765335545.jpg" alt="mers"><p class="wp-caption-text">Mers</p></div>
Nonstop
  • 21
  • 1
  • 3
  • 4
    Possible duplicate of [RegEx match open tags except XHTML self-contained tags](http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags) – gre_gor Dec 23 '16 at 15:29
  • Something called DOMDocument class in PHP may help with this. Not sure though. – anwerj Dec 23 '16 at 15:31

0 Answers0