title: re.sub Not working for me with python
body: <p>I have the following text in a text file:</p>
  
  <pre><code>"&amp;amp;
  ALIGN="left"
  COMSTOCK OIL &amp;amp; GAS, LP
  
  ALIGN="right"
  170040
  
  ALIGN="left"
  WOLFBONE (TREND AREA)&amp;amp;"
  </code></pre>
  
  <p>The following is my code after importing everything:</p>
  
  <pre><code>text_file = open("pages.txt", "r")
  page = text_file.read()
  
  regextext = "&amp;amp;"
  pattern1 = re.compile(regextext)
  search1 = re.findall(pattern1, page)
  print search1
  
  re.sub("&amp;amp;",'',page)
  print page
  
  search1 = re.findall(pattern1, page)
  print search1
  </code></pre>
  
  <p>It isn't stripping out the "&amp;". The findall finds all the instance but the re.sub() isn't doing its job. Any ideas? </p>