In this simple example, you can open the file and do fgets()it until you find the line with <!-- Begin -->and save the lines until you find it <!-- End -->.
If your HTML is in a variable you can simply do:
<?php
$begin = strpos($var, '<!-- Begin -->') + strlen('<!-- Begin -->');
$end = strpos($var, '<!-- End -->');
$text = substr($var, $begin, ($end - $begin));
echo $text;
?>
.