title: ruby split lines from files while iterating each line
body: <p>I have a log fine which contains status of my application related components and when I iterated that log file by each line I need to split all the lines which relies between to lines.</p>
  
  <p>For example I have below log file,</p>
  
  <pre><code>- Component 1 Check
  - Nodes check
    * status of sub string 1
    * status of sub string 2 
  - Jakarta component check
  </code></pre>
  
  <p>so in the above example, I need to split the lines between "<code>- Nodes</code>" and "<code>- Jakarta</code>"</p>