title: Java -- Best way to grab ALL Strings between two regex?
body: <p>I have a requirement where I want to extract the content from a file which can have multiple occurrences of the pattern. Basically files containing multiple sections and I want to extra each section. The extracted content should include the string matching the pattern </p>
  
  <p>Eg: File content</p>
  
  <pre><code>01
  Community based Index1- 
  ...some text....
  ...some text..
  Conclusion: The significant increase of testing 
  ...
  some text. 
  
  02
  Community based Index2- 
  .some text.
  .some text.
  Conclusion: The significant increase of testing 
  ...
  ...&lt;End of para&gt; 
  :
  :
  </code></pre>
  
  <p>I am trying with the following pattern but it is not working</p>
  
  <pre><code>String patternStart = "\\d{2}[^\\d.,)][\\s:-]?[\\r\\n][A-Z]";
  String patternEnd = "Conclusion.*(\\n.*)*"; \\ including the entire para
  
  I am trying with pattern matcher but it is not working, I am getting no match found.
  
   String regexString = Pattern.quote(patternStart)  + "(.*?)" + Pattern.quote(patternEnd);
   Pattern pattern = Pattern.compile(regexString);
   while (matcher.find()) {
              String textInBetween = matcher.group(1);
    }
  </code></pre>