Python问题 正则表达式re.match的问题

2025-03-04 22:17:56
推荐回答(1个)
回答1:

因为re.match('[0-3]','abcdsws4sawqe1sad')返回的就是个None
看错误提示,AttributeError: 'NoneType' object has no attribute 'group'
m的类型就是None,None哪来的group.错误追踪描述的很清楚了