match.group NoneType
时间: 2023-10-01 18:07:12 浏览: 128
python的re模块应用实例
This error message occurs when a regular expression match object is expected, but the match is not found and the method or attribute is called on a NoneType object instead. This can happen if the regular expression does not match the input string or if the input string is empty. To avoid this error, it is important to check whether the match object is None before calling any methods or attributes on it.
阅读全文