#NEWLINE# def find_regions( self , line , regex_obj ) : #NEWLINE# #INDENT# '        Returns a list of tuples (start, end) matching the regex.\n        ' #NEWLINE# if ( not regex_obj ) : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# if ( isinstance ( regex_obj , re . _pattern_type ) and ( not regex_obj . pattern ) ) : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# return [ ( m . start ( 0 ) , m . end ( 0 ) ) for m in re . finditer ( line , line ) ]