I have a string as follows.
var str = `
hello
world
hi
good
`;
There is a blank line between world and hi. I want to split the blank line to get an array. How to achieve this? Tried this and it didn't work. str.split(/^\r|\r\n|\n$/);