I want to remove all single carriage returns but not two or more carriage returns if they are followed by each other.
remove ¶ but not ¶¶
i.e.
s.replace(/[\n\r]/g, '');
removes all return lines
I want to remove all single carriage returns but not two or more carriage returns if they are followed by each other.
remove ¶ but not ¶¶
i.e.
s.replace(/[\n\r]/g, '');
removes all return lines
obj.Summary = obj.Summary.replace(/(\n){2,}/g, '¶');
obj.Summary = obj.Summary.replace(/[\n\r]/g, '');
obj.Summary = obj.Summary.replace(/[¶]/g, '\n\r');