in reply to Re^2: Replacing new lines in multi line text box form fields with <br>.
in thread Replacing new lines in multi line text box form fields with <br>.
s/\x0D\x0A/\n/g
And don't forget to HTML-escape your string, when inserting it into the HTML, both for the TEXTAREA for edit and in the plain HTML for view, the former before you insert your <BR> tags — or you might end up escaping your freshly inserted tags, too.
Oh, and it'd still be nice if you kept the newlines. For example:
ors/$/<BR>/mg;
s/\n/<BR>\n/g;
|
|---|