Hi. I'm messing with regular expressions in python and am trying to match five-letter words in a file. Here's my code:
Code:
wordlist = re.findall(r'\s\w{5}\s', text)
Trouble is it also matches the newline characters. I want a list of five letter words - no newlines. I will look around the docs some more but I would appreciate a quick answer if you have the time. Thanks.