我是新的Python和我使用pycharm.when我运行此代码在我的python空闲其运行,但是当我在我的pycharm中使用此代码它的显示错误pycharm模块错误NoneType'对象没有属性'组'
我的代码是
import sys
import re
for line_string in iter(sys.stdin.readline,''):
line = line_string.rstrip()
date = re.search(r'date=[0-9]+\-[0-9]+\-[0-9]+', line)
date = date.group()
print date
line 8, in <module>
date = date.group()
AttributeError: 'NoneType' object has no attribute 'group'
@Danial Ahmed同样的错误 – warezers
该表达式不包含任何非拉丁字符。 – DyZ