title: Finding a similar text present in string in python
body: <p>I have a txt file containing text</p>
  <blockquote>
  <p>Table of Contents</p>
  <p>Preface  1</p>
  <p>Chapter 1: Tokenizing Text and WordNet Basics    7</p>
  <p>Tokenizing text into sentences    8</p>
  <p>Tokenizing sentences into words   10</p>
  <p>Tokenizing sentences using regular expressions    12</p>
  </blockquote>
  <p>If the string I have is :</p>
  <pre><code>input = &quot;Tokenzing sentence using expressions&quot;
  </code></pre>
  <p>I thought of using beginning and ending words to extract the sentence but there are lot of repetitions.</p>
  <p>So whats the best way to get the output</p>
  <blockquote>
  <p>Tokenizing sentences using regular expressions</p>
  </blockquote>