" The Elephant's 4 cats. "
the elephants 4 cats
temp1 = re.sub('\W+',' ', str).strip()
output = temp2.lower()
the elephant s 4 cats
temp1 = re.sub(r'[^\w\s_]+', '', str).strip()
Basically, your original \W+ means "non-word characters", which matches spaces, quotes, and periods. So it replaces them all with a "space"...which means the apostrophe gains a space.
By specifically matching non-word-non-space-non-underscore characters, you'll probably get a better replacement.