title: How to delete a specific part of an html file in Python
body: <p>I am working on a html file which has item 1, item 2, and item 3. I want to delete all the text that comes after item 2. I can find item 2 in the file like this:</p>
  
  <pre><code>Item2= re.compile (r'(Item&amp;nbsp;2)',re.I|re.S)
  Item2match= Item2.findall(file)
  </code></pre>
  
  <p>but I don't know how can I delete the text that comes after it.</p>