rgl,
<!DOCTYPE HTML>
<html>
<head>
<title></title>
</head>
<body>
<script language="JavaScript" type="text/javascript">
var content='<div style="clear: both;"> </div>\
<script type="text/javascript">// <![CDATA[\
jQuery(document).ready(function(){\
\
jQuery("#he5").css("display","none");\
jQuery("#hb5").on("click",function () {\
jQuery("#he5").toggle("slow");\
});\
})\
// ]]><\/script>';
//var htmlJsRe = new RegExp('([\\w\\W]*)<script type="text\/javascript">([\\w\\W]*)<\\/script>', 'mg');
var htmlJsRe = new RegExp('([\\w\\W]*?)<script type="text/javascript">([\\w\\W]*?)</script>', 'mg');
var htmlJsReArray = htmlJsRe.exec(content);
alert(htmlJsReArray.join('\n\n\n'));
</script>
</body>
</html>