in reply to HTML stripper...

It should remove the comments in each code.
That's easy. However, if your goal is to remove comments, and nothing else, you cannot do it with a simple regexp. You will have to fully tokenize both HTML and Javascript (and partially parse HTML and Javascript to know when the document switches language). What is a comment, after all, is context sensitive.

Replies are listed 'Best First'.
Re^2: HTML stripper...
by locked_user sundialsvc4 (Abbot) on Nov 23, 2010 at 21:36 UTC

    Indeed.   You are probably going to go straight to something like HTML::Parser ... a true parser that can invoke action-routines when a particular construct has been recognized, no matter what it actually takes to recognize the presence of a construct.