I\'m trying to split text in a JTextArea using a regex to split the String by \\n However, this does not work and I also tried by \\r\\n|\\r|
JTextArea
\\n
\\r\\n|\\r|
Maybe this would work:
Remove the double backslashes from the parameter of the split method:
split = docStr.split("\n");