title: Android - split at a line break in String? (Paragraphs)
body: <p>I am currently retrieving some information from a text file (.txt) that contains some paragraphs. When I retrieve the String from the text file I want to split it so that I each paragraph is in a String object.</p>
  
  <p>Here is the text I get from the text file:
  <a href="http://www.carlowweather.com/plaintext.txt" rel="nofollow">http://www.carlowweather.com/plaintext.txt</a></p>
  
  <p>I have tried to split the String using line breaks and return carriage feeds but neither appear to work, see my code below:</p>
  
  <pre><code> int pCount=0;
  public void parseData(String data){
      String regex = "(\\n)";
      String split[] = data.split(regex);
      for(int i = 0; i&lt;split.length; i++){ 
          Log.e("e", pCount + " " + split[i]);
          pCount ++;
      }
  }
  </code></pre>
  
  <p>I have also tried "\r" and various combinations I have found via searching the net but none seem to work on Android with this text file, I'm guessing the file doesn't contain line breaks or carriage returns? But just blank lines?</p>
  
  <p>What is the best way to split the paragraphs into String objects?</p>