import re
regex = re.compile(r"title=\".*(title=\"(.*.)\">)")
test_str = "<div id=\"video_6003150\" class=\"thumb-block\"><div class=\"thumb-inside\"><div class=\"thumb\"><a href=\"/video6003150/pure_mature_janet_mason\"><img src=\"https://cdn77-pic.xvideos-cdn.com/videos/thumbs169l/03/4b/22/034b224b0f77b7260aa8d6c44b49cb69/034b224b0f77b7260aa8d6c44b49cb69.5.jpg\" data-idcdn=\"10\" data-videoid=\"6003150\" id=\"pic_6003150\"><div class=\"videopv\" style=\"display: none;\"><a href=\"https://www.xvideos.com/video6003150/pure_mature_janet_mason\"></a><div class=\"progress\" style=\"display: none;\"><div class=\"bar\" style=\"width: 100%;\"></div></div></div></a></div><button class=\"watch-later init-ok\" title=\"Ver después\"><span class=\"icon-f icf-clock\"></span></button><a class=\"icon-f icf-check-circle icf-white-fill prof-verified-tick\" title=\"Modelo verificada\" href=\"/verified/videos\"></a></div><div class=\"thumb-under\"><p><a href=\"/video6003150/pure_mature_janet_mason\" title=\"Pure Mature Janet Mason\">Pure Mature Janet Mason</a></p><p class=\"metadata\"><span class=\"bg\"><span class=\"duration\">7 min</span><a href=\"/channels/puremature\"><span class=\"name\">Pure Mature</span></a><span><span class=\"sprfluous\"> - </span> 9,7M <span class=\"sprfluous\">Vistas</span></span><span class=\"sprfluous\"> - </span></span></p></div></div>"
matches = regex.finditer(test_str)
for match_num, match in enumerate(matches, start=1):
print(f"Match {match_num} 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