title: How to use \b or ^ alongwith pattern to replace complete word?
body: <p>I am trying to use regex for replacement of words, but instead of complete words even words in between sentences are getting replaced.</p>
  
  <pre><code>prepos = ['has','had','have','is','you']
  prepo = re.compile('|'.join(prepos))
  
  # x["text"] - contains text with sentences in english
  
  twete = re.sub(prepo,' ',x["text"])
  print(twete)
  </code></pre>
  
  <p>output: replaces subwords as well i want to subsitute complete word ocurrences only. How can I use <code>^</code> or <code>\b</code> in this case?</p>