I am working with a string of text that I want to search through and only find 4 letters words. It works, except it also finds 4+ letter words as well.
import re
test ="hello, how are you doing tonight?"
total = len(re.findall(r'[a-zA-Z]{3}', text))
print (total)
It finds 15, although I am not sure how it found that many. I thought I might have to use \b to pick the beginning and the end of the word, but that didn't seem to work for me.