break line after a full stop in jsoup

I am trying to break the paragraph after a full stop. I am using jsoup to capture the data from a website. How do i break the line after a sentence ends? Here is my codes that i have tried so far.

try {
System.out.println("k");
org.jsoup.nodes.Document doc = Jsoup.connect("http://ghr.nlm.nih.gov/gene/TSG101 ").get();
org.jsoup.select.Elements els = doc.select("p");



StringBuilder sb = new StringBuilder();
for (org.jsoup.nodes.Element el : els) {
sb.append(System.getProperty(".\n"));
System.out.println(el.text());

sb.append(el.text());}

System.out.println(sb.toString());

}

Answers


Try the following:

sb.append(el.text().append('\n'));

Need Your Help

synchronized methods in a Runnable

java concurrency synchronized runnable

I am writing a Runnable class that's packing messages together for some time or until a given size is reached before sending them over the wire. It is designed to allow other threads to change some

SQL Server - CASE within a CASE checking for NULL

sql-server null case user-defined-functions

I am still learning SQL so this may seem a very odd question, but is this the best way to use CASE within a CASE to check for NULL?