Duy Dinh - 2014-09-12
    query = "The child has several balls. The diameter of each ball is 1.5 cm. All the balls are blue.";
    String[] sentences = query.split("\n|((?<!\\d)\\.(?!\\d))");
    System.out.format("There are %d sentences in the input text:\n",
            sentences.length);
 

Last edit: Duy Dinh 2014-09-12