def last_word(text, include='alphanum_underscore'):
 if (not text):
  return ''
 if text[(-1)].isspace():
  return ''
 else:
  regex = cleanup_regex[include]
  matches = regex.search(text)
  if matches:
   return matches.group(0)
  else:
   return ''

def last_word ( text , include = 'alphanum_underscore' ) : if ( not text ) : return '' if text [ ( - 1 ) ] . isspace ( ) : return '' else : regex = cleanup_regex [ include ] matches = regex . search ( text ) if matches : return matches . group ( 0 ) else : return ''
find the last word in a sentence .