re.search(r'。\ s ^ Eat',' hello Eat')。group()与Eat不匹配

时间:2018-03-31 14:03:29

标签: python regex

正则表达新手:) 我正在尝试匹配字符串" Eat"如下:

re.search(r'.\s^Eat', 'hello Eat').group()

错误(因为它返回None):

AttributeError: 'NoneType' object has no attribute 'group'

即使我用过"。"搜索任何字符然后空格,最后一个插入符号仍然返回无。请解释

0 个答案:

没有答案
相关问题