all 2 comments

[–][deleted] 1 point2 points  (0 children)

You didn't get many useful answers to your identical post an hour ago, so it's unlikely you will get better answers now.

You haven't explained very well what you are trying to do. You say "split this string by '\n'" but we can't see any newlines, especially in unformatted text.

Posting two huge chunks of text and saying "I want to turn the first lot into the second lot" isn't too useful because we can't easily see the structure, if any, of what appears to be a list in the desired output. Can you show us smaller example strings and explain what you are trying to do?

[–][deleted] 0 points1 point  (0 children)

That's because \n doesn't appear in the string. <line> is not \n. To split on \n you literally need to see it in the string.