kymbrik
9/7/2019 - 11:24 AM

Extract substring regexp

import re
new_cutted_link = re.sub(r'(.*)(\-\d{1,4}x\d{1,4}\.(jpg|jpeg))', r'\g<1>.jpg', new_url)