title: python regex re.findall taking too long to execute
body: <p>I want to remove all the words that end with a dot '.' in a file. My file is around 15 MB and would have more than 400,000 words. I am using <code>re.findall</code> to find such words and replace them. </p>
  
  <pre><code>for w in re.findall(r'([a-zA-Z0-9]+\.)', test_dict):
      test_dict = test_dict.replace(w, ' ')
  </code></pre>
  
  <p>This is taking very long time to execute. Is there a way to improve performance or any other alternate method to find and replace such words?</p>