I have a external resource (raw text file) like:
1. Title 1
Content 1
|
2. Title 2
Content 2
|
3. Title 3
Content 3
I load them in a web page via AJAX and want to use content.split("\n|\n") to extract its content into an array for my use. But it seems it's not working.
What's weird is that split("\n|") works, but neither do split("|\n") nor split("\n|\n") work.