Jump to content

replace test between p and div


mraza

Recommended Posts

hi i m trying to remove text between p and div tag but cant figure it out, plz any help.

my text that i wants to remove from html:

<p><strong>More:</strong></p>

<p></p>

<p>

<br /> <br />

<br /> <br />

<br /> <br />

<br />



Test Text:more.text
<br />







</p>



<script src='/plus/ad_js' language='javascript'></script>

<div class="relran">

<script src='file.js' language='javascript'></script>





</div>

 

i wants to remove all of this text from first line to end so tried this:

$html = preg_replace("/<p><strong>More(.*?)+<\/div>/i", "", $html);

but it does not work, plz any help?

thanks

Link to comment
https://forums.phpfreaks.com/topic/224831-replace-test-between-p-and-div/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.