<?php $regex = '/(<table id="table-[0-9]+">[\s]+<tbody>[\s]+<tr><td><p>\{\{Phrase (1|2)\}\}<\/p><\/td><\/tr>[\s]+<\/tbody>[\s]+<\/table>)/'; $html = '<table id="table-1"> <tbody> <tr><td><p>{{Phrase 1}}</p></td></tr> </tbody> </table> <table id="table-2"> <tbody> <tr><td><p>Sample text 1 goes here..</p></td></tr> </tbody> </table> <table id="table-3"> <tbody> <tr><td><p>{{Phrase 2}}</p></td></tr> </tbody> </table> <table id="table-4"> <tbody> <tr><td><p>Sample text 2 goes here..</p></td></tr> </tbody> </table>'; $clean = preg_replace($regex, '', $html); echo $clean;
You have javascript disabled. You will not be able to edit any code.