title: How to Start read a TextFile from Specific line using java
body: <p>I want to start read a TextFile from specific line
  I have a text file like this</p>
  
  <pre><code>        #11
          mango
          apple
          orange
          END
          #22
          dog
          cat
          monkey
          END
          #33
          car
          bus
          van
          END
  </code></pre>
  
  <p>here i want to get all lines inbetween #22 and END</p>
  
  <pre><code>      String text = new String(Files.readAllBytes(Paths.get("mypath")), 
        StandardCharsets.UTF_8);
        //multiple lines to single line
        text=text.replaceAll("[\r\n]+", " "); 
        Pattern pattern = Pattern.compile("#22(.*?)END");
        Matcher matcher = pattern.matcher(text);
        while (matcher.find()) {
            System.out.println(matcher.group(1));
        }
  </code></pre>
  
  <p>it gives output in one line(dog cat money).How to get only the below lines from File(line by line)</p>
  
  <pre><code>                dog
                  cat
                  monkey
  </code></pre>
  
  <p>I am not sure what number comes after a specific number(#22).#33 is for example.Any ways to get  only with #22 and END(before #33)</p>