I would like to use Notepad++ to search a javascript file or a html file containing some javascript and replace all single line comments with a multiline style comment.
This is not a job for regex, use a parser instead. Have a look at: Esprima for example.
Quick way
Use this regex:
(?<=\s)//([^\n\r]*)
Replace with:
/\*$1\*/
Explanatory way
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 (\n) 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