>>> import re
>>> s = '<html><head><title>司刚军</title></head></html>'
>>> print(re.match('<.*>',s).group())
<html><head><title>司刚军</title></head></html>
>>> print(re.match('<.*?>',s).group())
<html>
>>>
其中,<.*>称为贪心匹配,<.*?>称为非贪心匹配
>>> import re
>>> s = '<html><head><title>司刚军</title></head></html>'
>>> print(re.match('<.*>',s).group())
<html><head><title>司刚军</title></head></html>
>>> print(re.match('<.*?>',s).group())
<html>
>>>
其中,<.*>称为贪心匹配,<.*?>称为非贪心匹配