3v4l.org

run code in 300+ PHP versions simultaneously
<?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;

preferences:
33.5 ms | 404 KiB | 5 Q