Comment remover
by Derek Leung
HTML
<textarea></textarea><button>remove comments</button>
CSS
textarea{
width:500px;
height:500px;
}
JavaScript
$("button").click(function(){
$("textarea").val($("textarea").val().replace(/<!--(?!\s*(?:\[if [^\]]+]|<!|>))(?:(?!-->)(.|\n))*-->/g,""));
});