import re
regex = re.compile(r"thumbnail_src\":(.*),\"is_video")
test_str = "\"thumbnail_src\":\"https:\\/\\/scontent-fra3-1.blablabla.com\\/t51.2885-15\\/s640x640\\/sh0.08\\/e35\\/1234567_984778981596410_1107218704_n.jpg\",\"is_video\":false"
match = regex.search(test_str)
if match:
print(f"Match was found at {match.start()}-{match.end()}: {match.group()}")
for group_num, group in enumerate(match.groups(), start=1):
print(f"Group {group_num} found at {match.start(group_num)}-{match.end(group_num)}: {group}")
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Python, please visit: https://docs.python.org/3/library/re.html