I'm looking for a solution to split a string at every nth linebreak. Lets say i have one string that has six lines
"One\nTwo\nThree\nFour\nFive\nSix\n"
So splitting at 3rd line break would give me something like
"One\nTwo\nThree\n" and "Four\nFive\nSix\n"
I've found solutions to do it at nth character, but i can't be definite of at what character length the nth break would occur. I hope my question is clear. Thanks.
One\n\n\n\n\nTwo\n\nThree\n\nFour\n\nFive\n\n\n\nSix\n?