javascript/regular expressions/replace
I'm currently trying to display some text in a textarea, and later in just regular html on different jsp pages. To do this I have to convert from \n to <br/>, and then back from <br/> to \n. To do the former one I do
text = text.replace(/\n/g, "<br />");
which works correctly, but when reversing it,
replace("<br />", \n);
The \n disappears and it does not line break.
the way replace works is it does replace(reg exp, string).
so how would this be done?
Thanks,
David

