I gave a poor description in my prev. question on what i want to do,
so here's another shot:
i have this string:
"<HTML>\n"+
"<P><BODY>\n"+
"<%for(var i=0;i<5;i++){%>\n"+
"<%response.body+=i;%><br/><br/>\n"+
"<%}%>\n"+
"<table border=’1’ width=”100%”>\n"+
"</BODY></P>\n"+
"</HTML>\n";
and i want to manipulate this into the following:
"response.body+=<HTML>;\n"+
"response.body+=<P><BODY>;\n"+
"for(var i=0;i<5;i++){\n"+
"response.body+=i;response.body+=<br/><br/>;\n"+
"response.body+=</BODY></P>;\n"+
"response.body+=</HTML>;\n";
meaning; adding to anything not in "<% some code %>"
this: "response.body+=" and ";".
how can it be done?
<% ... %>tags are missing from your desired result? And speaking of<% ... %>- such tags imply JSP or ASP server-side code, so why do you have that in a JavaScript string?<table>element and the closing}from theformissing from the desired output?