【发布时间】:2015-09-09 13:46:16
【问题描述】:
假设我在阅读文件时有两个段落:
'Baa, baa, black sheep, have you any wool?
Yes sir, yes sir, three bags full!
One for the master
One for the dame'
'Mary had a little lamb,
its fleece was white as snow;
And everywhere that Mary went,
the lamb was sure to go.'
如果我搜索'lamb',是否有任何代码(使用正则表达式或其他东西)会选择整个第二段?
【问题讨论】:
标签: python regex nltk text-mining