def get_tab_entry_info(entry, separator):
 (needle, index, path) = (None, None, None)
 match_needle = re.search(('(.*?)' + separator), entry)
 match_index = re.search((separator + '([0-9]{1})'), entry)
 match_path = re.search((((separator + '[0-9]{1}') + separator) + '(.*)'), entry)
 if match_needle:
  needle = match_needle.group(1)
 if match_index:
  index = int(match_index.group(1))
 if match_path:
  path = match_path.group(1)
 return (needle, index, path)

def get_tab_entry_info ( entry , separator ) : ( needle , index , path ) = ( None , None , None ) match_needle = re . search ( ( '(.*?)' + separator ) , entry ) match_index = re . search ( ( separator + '([0-9]{1})' ) , entry ) match_path = re . search ( ( ( ( separator + '[0-9]{1}' ) + separator ) + '(.*)' ) , entry ) if match_needle : needle = match_needle . group ( 1 ) if match_index : index = int ( match_index . group ( 1 ) ) if match_path : path = match_path . group ( 1 ) return ( needle , index , path )
given a tab entry in the following format return needle .