foreach (glob("*.html") as $file) {$page = file_get_contents($file);$current = preg_replace('<!--[^\[](.*?)-->', '', $page);file_put_contents($file, $current);echo $file . "<br>";}
This works. It removes all the html comments from every html file in a folder. Thanks for pointing me in the right direction!