def get_afe_job_id(tag):
 match = re.search('^([0-9]+)-.+/.+$', tag)
 if match:
  return match.group(1)
 return ''

def get_afe_job_id ( tag ) : match = re . search ( '^([0-9]+)-.+/.+$' , tag ) if match : return match . group ( 1 ) return ''
given a tag return the afe_job_id .