Those will only work if you dont have 2 comments with content between like ...
<!--comment--> Im a goner <!--comment-->
You need ...
//preg_replace('/<!--[^>]*-->/', '', $html); // <- this is incorrect see ridgrunners comments below, you really need ...
preg_replace('/<!--.*?-->/', '', $html);
The [^>] matches anything but > so as to not go past the matching > seeking the next.
I havent tested phps regex but it claims to be perl regex which is by default 'greedy' and will match as much as possible.
But since youre matching a specifically named placeholder you just need the entire string and to use str_replace() instead.
str_replace('<!--my comment goes here-->', $comment, $html);
And, rather than replacing placeholders in a file just make it a php file and write out the variables.
:)