720p Web-dl | The Pitt S01e11

show = match.group(1).replace('.', ' ').replace('_', ' ').strip().title() season = int(match.group(2)) episode = int(match.group(3)) quality = match.group(4) or "unknown" source = match.group(5) or "unknown"

# Pattern: show name + sXXeYY + optional quality + optional source pattern = r'^(.*?)\s+s(\d+)e(\d+)\s+(\d+p)?\s*-?\s*(\w+)?$' match = re.search(pattern, name, re.IGNORECASE) the pitt s01e11 720p web-dl

It sounds like you're looking for a that can process or identify a file named exactly like: show = match