I'd like to split a string with using pattern like this:
it starts and ends with '\n' and contains an arbitrary number of whitespace or '\n' in between.
Edit:
This input:
string s = "aaa\n \nbbb\n \nccc\n \n \nddd";
should result in an array containing
aaa
bbb
ccc
ddd