In the following: import re
title_re = re.compile(r'(.*?) ((?:\d+x\d+)|(?:\d+\.\d+\.\d+))(.*?) ?\((.*)\)') m = title_re.match(entry['title']) What exactly is title_re searching for? And assuming that entry['title'] equates to u'Battlestar.Galactica.S03E01E02.HR.HDTV.XviD-SFM' then what should end up in m? Also what should the m.group(1) return? Answers should be suitable for advanced python idiot (please).