如题,下面是两段代码:
if __name__ == '__main__':
str = 'video_1751028'
ex = 'video_(.*)'
contId = re.findall(ex, str)
print(contId)
```python
if __name__ == '__main__':
str = 'video_1751028'
ex = 'video_(.*?)'
contId = re.findall(ex, str)
print(contId)
我想得到video后面的id,但是只有第一个(应该是贪婪)才能得到id,第二种会输出一个[' '],请问原理