php - Regular expressions : find all div tags which contain tag img -


i need find , replace div tags contains tag img, tried regular expression without succes :( example of regular expression tried: /(<div class="indicator"[^<]*>.*<img[^>]*>[^<]*</div>)/g please

thank you

if have potential of having nested div div image dystroy said can't done regular expression it's not regular language. should use dom. relevant: how parse , process html/xml in php?


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -