I\'m looking for a regex to match hyphenated words in python.
The closest I\'ve managed to get is: \'\\w+-\\w+[-w+]*\'
text = \"one-hundered-and-thre
Try this:
re.findall(r'\w+(?:-\w+)+',text)
Here we consider a hyphenated word to be: