使用Python 中的以下内容 - 检查 Word 是否在字符串中
>>> def findWholeWord(w):
... return re.compile(r'\b({0})\b'.format(w), flags=re.IGNORECASE).search
...
>>> findWholeWord('seek')('those who seek shall find')
<_sre.SRE_Match object at 0x22c1828>
>>> findWholeWord('seek')
<built-in method search of _sre.SRE_Pattern object at 0x22b8190>
>>> findWholeWord('seek')('those who seek shall find')
<_sre.SRE_Match object at 0x22c1828>
>>> findWholeWord('seek')('those who shall find')
这是一个错误还是应该是结果?
<_sre.SRE_Match object at 0x22c1828>