def ep_match(season, episode, expr, title=None):
 m = _RE_SP.search(expr)
 if m:
  req_season = int(m.group(1))
  req_episode = int(m.group(2))
  if ((season > req_season) or ((season == req_season) and (episode >= req_episode))):
   if title:
    show = expr[:m.start()].replace('.', ' ').replace('_', ' ').strip()
    show = show.replace(' ', '[._ ]+')
    return bool(re.search(show, title, re.I))
   else:
    return True
  else:
   return False
 else:
  return True

def ep_match ( season , episode , expr , title = None ) : m = _RE_SP . search ( expr ) if m : req_season = int ( m . group ( 1 ) ) req_episode = int ( m . group ( 2 ) ) if ( ( season > req_season ) or ( ( season == req_season ) and ( episode >= req_episode ) ) ) : if title : show = expr [ : m . start ( ) ] . replace ( '.' , ' ' ) . replace ( '_' , ' ' ) . strip ( ) show = show . replace ( ' ' , '[._ ]+' ) return bool ( re . search ( show , title , re . I ) ) else : return True else : return False else : return True
return true if season .