title: How to use regex to copy section from file?
body: <p>I have a file with the following structure:</p>
  
  <pre><code>******
  Block 1
  text
  text
  ...
  End 
  ******
  Block 2
  text
  text
  ...
  End 
  ******
  Block 3
  text
  text
  ...
  End 
  ******
  </code></pre>
  
  <p>and so on. I want to open the file read each line and save the information of the first block in a string. This is what I have so far.</p>
  
  <pre><code>Block = ''
  with open(File) as file:
          for line in file:
              if re.match('\.Block.*', line):
                  Block += line
              if 'str' in line:
                  break
      print (Block)
  </code></pre>
  
  <p>However, when I print Block I am getting: </p>
  
  <pre><code>Block 1
  Block 2
  ...
  </code></pre>
  
  <p>How can I use my regex to copy the lines from Block 1 to End?
  Thank you</p>