📜  py 正则表达式 if .jpg - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:31.471000             🧑  作者: Mango

代码示例1
>>> import re
>>> text = "test1.jpg, test2.jpg testest.gif tata.jpg, trol.jpg, dam.blog"
>>> re.findall(r"\S+\.jpg", text)
['test1.jpg', 'test2.jpg', 'tata.jpg', 'trol.jpg']