从python中的字母数字字符串中提取其中包含3个以上字符的单词

时间:2017-08-07 11:53:52

标签: python regex string

假设这是字符串

input = "{('Blue',): 24, ('lej',): 28, ('green',): 19, ('pul',): 36, ('cas',): 23, ('minit',): 46}"

通过使用这个正则表达式,我得到所有单词(不包括数字),但是如何选择只选择包含三个以上字符的单词的条件

import re
word1 = " ".join(re.findall("[a-zA-Z]+", input))

期待这样的输出

o/p =  "Blue green minit"

任何帮助都会对此表示赞赏。 感谢

0 个答案:

没有答案