Use this regex:
1 - Double slashes // weren't going to replace, because you had them in that capturing group. So you'll capture and replace them again.
2 - Most of the time there is nothing but a space or a newline (
) before comments begin. I included this as a lookbehind to ensure. By this way, URLs and DOCTYPE won't get touched.
* I don't confirm this searching and replacing method, however it may work with most cases.
Take care of settings. You should have you cursor at the very beginning of the file content.
Then do a Replace All