title: Parse .txt file to different arrays
body: <p>I have .txt file with different data. All this data organize for 3 category. I need to get some data for 1st array, some for 2nd and another for 3rd. How to do this?</p>
  
  <p>The .txt file contains part X, empty spaces and # (to separate text from 2nd and 3rd category) </p>
  
  <pre><code>part 1
  some data for 1st array
  
  part 2
  some data for 2nd array#some data for 3rd array
  
  part 3
  some data for 1st array
  
  part 4
  some data for 2nd array#some data for 3rd array
  </code></pre>
  
  <p>At the same time, I need to gather data from each category:
  from part 1 and 3, from part 2 and 4, after #</p>
  
  <p>Right now I'm stuck, my code takes all data and I don't know what should I do next.</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      TextView textView;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          textView = (TextView) findViewById(R.id.text1);
          textView.setMovementMethod(new ScrollingMovementMethod());
          String data = "";
          StringBuffer sBuffer = new StringBuffer();
          InputStream is = this.getResources().openRawResource(R.raw.phrases);
          BufferedReader reader = new BufferedReader(new InputStreamReader(is));
  
          if ( is!= null){
              try {
                  while ((data=reader.readLine()) !=null){
                      sBuffer.append(data + "\n");
                  }
                  textView.setText(sBuffer);
                  is.close();
              }catch (Exception e){
                  e.printStackTrace();
              }
          }
      }
  }
  </code></pre>