title: Parsing a Large text file in Python using Regular Expression
body: <p>How to store a text data starting from a certain word and ending with a certain word in a large text file (using python and regex).</p>
  
  <p>Here is a part of text file:</p>
  
  <pre><code>X_FUNCTION = linear
  TITLE =
  netlist_run
  Vnet04  YUNITS = volts
  +  0.000000000000000E+00 -4.000000000000000E-01  3.636363636363636E-02 -4.000000000000000E-01
  +  7.272727272727272E-02 -4.000000000000000E-01  1.090909090909091E-01 -4.000000000000000E-01
  +  1.454545454545454E-01 -4.000000000000000E-01  1.818181818181818E-01 -4.000000000000000E-01
  +  2.181818181818182E-01 -4.000000000000000E-01  2.545454545454546E-01 -4.000000000000000E-01
  +  2.909090909090910E-01 -4.000000000000000E-01  3.272727272727273E-01 -4.000000000000000E-01
  Vnet05  YUNITS = volts
  +  0.000000000000000E+00  3.000000000000000E+00  3.636363636363636E-02  3.000000000000000E+00
  +  7.272727272727272E-02  3.000000000000000E+00  1.090909090909091E-01  3.000000000000000E+00
  +  1.454545454545454E-01  3.000000000000000E+00  1.818181818181818E-01  3.000000000000000E+00
  +  2.181818181818182E-01  3.000000000000000E+00  2.545454545454546E-01  3.000000000000000E+00
  +  2.909090909090910E-01  3.000000000000000E+00  3.272727272727273E-01  3.000000000000000E+00
  vbs_i  YUNITS = amps
  +  0.000000000000000E+00  3.881535006369462E-12  3.636363636363636E-02  3.958355883215995E-12
  +  7.272727272727272E-02  4.155732392087960E-12  1.090909090909091E-01  4.661608907762973E-12
  +  1.454545454545454E-01  5.953136322408749E-12  1.818181818181818E-01  9.230381781895836E-12
  +  2.181818181818182E-01  1.746801289794467E-11  2.545454545454546E-01  3.787865538450135E-11
  +  2.909090909090910E-01  8.739483655864867E-11  3.272727272727273E-01  2.040272699537106E-10
  </code></pre>
  
  <p>I want to start saving the data starting from line <code>Vnet04  YUNITS = volts</code> till just before the starting of line <code>Vnet05  YUNITS = volts</code> in a object let say <code>a</code>. and then again I want to save data starting from line <code>Vnet05  YUNITS = volts</code> till just before the starting of line <code>vbs_i  YUNITS = amps</code> in a object <code>b</code></p>
  
  <p>As my text file is over 1000k lines. I want to parse it only once. </p>