#NEWLINE# def search_regexp( self ) : #NEWLINE# #INDENT# '\n        Define the regexp used for the search\n        ' #NEWLINE# if ( ( self . season == '' ) and ( self . episode == '' ) ) : #NEWLINE# #INDENT# regexp = ( '^%s.*' % self . title . lower ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . episode == '' ) : #NEWLINE# #INDENT# regexp = ( '^%s.*(s[0]*%s|season[\\s\\_\\-\\.]*%s).*' % ( self . title . lower ( ) , self . season , self . season ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# regexp = ( '^%s.*((s[0]*%s.*e[0]*%s)|[0]*%sx[0]*%s).*' % ( self . title . lower ( ) , self . season , self . episode , regexp . season , self . episode ) ) #NEWLINE# #UNINDENT# #UNINDENT# return regexp