目录
python正则表达式
[参考文章]https://www.runoob.com/python/python-reg-expressions.html
python group()和groups()的用法
a = '123abc456'
m = re.match(r'([0-9]* ) ([a-z]* )([0-9] *)', a)
m.group()
> > '123abc456'
m.group(1)
> > '123'
m.group(2)
> > 'abc'
m.group(3)
> > '456'
m.group(4)
> > 报错
m.groups()
('123', 'abc', '456')