programming-examples/python/Regular_Expression/Find all three, four, five characters long words in a string.py
2019-11-15 12:59:38 +01:00

3 lines
111 B
Python

import re
text = 'The quick brown fox jumps over the lazy dog.'
print(re.findall(r"\b\w{3,5}\b", text))