正則切分解析文本數據文件

mport re #正則表達式 mySent = 'This book is the best book.' regEX = re.compile('\\W*') # \\W*表示除了單詞數字外的任意字符串 list0fTokens = regEX.split(mySent) 上面也能夠寫成: mySent = 'This book is the best book.' listOfT
相關文章
相關標籤/搜索