title: Extracting whole words based on substring matching in python
body: <p>I am looking for a regex expression in Python.
  I have a long string of text, and I have a list of substrings  to do matching in the long string of text.</p>
  
  <p>Example substrings in : 'table', 'e furnish'
  Example string : </p>
  
  <pre><code>'Today is a good day to do up the table furnishings. Lets go to the store.'
  </code></pre>
  
  <p>For 'table', I would like to extract 'table'.
  For 'e furnish', I would like to extract 'table furnishings'.</p>
  
  <p>My current code is :</p>
  
  <pre><code>for item in checklist:
   pattern = r"[\s](.*)" + item +"([a-z]){0,2}[\s\.]"
   print pattern    
   matchObj = re.search(pattern, line)
   if matchObj:
     print "matchObj.group() : ", matchObj.group()
   else:
     print ("No match!!")
  </code></pre>
  
  <p>but I am not able to pick up whole words encapsulating the substrings.
  The thing is that the substrings can be single or multiple words and it might match entire words or just part of words. For those substrings with multiple words, the extracted words must be together with no other word in between.</p>
  
  <p>Thank you for your help, everyone.</p>