def extract_variables(log_format):
 if (log_format == 'combined'):
  log_format = LOG_FORMAT_COMBINED
 for match in re.findall(REGEX_LOG_FORMAT_VARIABLE, log_format):
  (yield match)

def extract_variables ( log_format ) : if ( log_format == 'combined' ) : log_format = LOG_FORMAT_COMBINED for match in re . findall ( REGEX_LOG_FORMAT_VARIABLE , log_format ) : ( yield match )
extract all variables from a log format string .