Answers for "py regex if .jpg"

0

py regex if .jpg

>>> 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']
Posted by: Guest on May-10-2021

Python Answers by Framework

Browse Popular Code Answers by Language