I am trying to use regex for replacement of words, but instead of complete words even words in between sentences are getting replaced.

```
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)

```

output: replaces subwords as well i want to subsitute complete word ocurrences only. How can I use `^` or `\b` in this case?