def name_extractor(subject):
 result = subject
 for name in re.findall(SUBJECT_FN_MATCHER, subject):
  name = name.strip(' "')
  if (name and RE_NORMAL_NAME.search(name)):
   result = name
 return platform_encode(result)

def name_extractor ( subject ) : result = subject for name in re . findall ( SUBJECT_FN_MATCHER , subject ) : name = name . strip ( ' "' ) if ( name and RE_NORMAL_NAME . search ( name ) ) : result = name return platform_encode ( result )
try to extract a file name from a subject line .