title: Removing complete lines of text in a text file (on Python)
body: <p>I am working with an output log file that has 12 thousand lines of code, most of which include something that looks like this: </p>
  
  <pre><code>"760.0132   EXP     window1: blendMode = 'avg'" 
  </code></pre>
  
  <p>My goal is to entirely remove any line that has "EXP    window1: blendMode = 'avg'". I can remove that text bit from all of the lines where it is found, but not the number. This is the code I have used to delete the text bits (borrowed from another stack overflow question/answer):</p>
  
  <pre><code>infile = "01_Day1_run1.txt"
  outfile = "01_Day1_run1_cleaned.txt"
  
  delete_list = ["    EXP     window1: blendMode = 'avg'"]
  
  fin = open(infile)
  fout = open(outfile, "w+")
  for line in fin:
  for word in delete_list:
      line = line.replace(word, "")
  fout.write(line)
  
  fin.close()
  fout.close()
  </code></pre>
  
  <p>I was hoping that I would be able to add something like</p>
  
  <pre><code>delete_list = ["1**.****    EXP     window1: blendMode = 'avg'"]
  </code></pre>
  
  <p>in order to delete any number that includes all of the text, and also any number in that line, but it does not seem to work. Any advice on how to best clean up the log file would be greatly appreciated.</p>
  
  <p>Thanks very much,
  Simon</p>