I don’t know Node.js but in javascript it can be done using split()
var content = "Hello \n bob \n ben je op deze \n world \n bobert",
content_array = content.split("\n");
content_array.forEach(function(entry) {
document.write("<content>'+entry+'</content><br />");
});
1
solved javascript finding a string in a string