1
在字符串中,我想使用re
模塊查找長度大於4的所有單詞。regx找到python 3.x中超過4個單詞的單詞
樣品輸入:This is good Python forum and its helping a lot to beginners.
輸出:['Python','helping','beginners]
下面我試過,但它不工作:
match=re.findall(r'([\w]{4}).*',str1)
請編輯包括到目前爲止您已經嘗試了所有步驟,Stack Overflow是不是代碼寫作服務。 –