import re


def get_component_name(job_name, DFG_name):
    """Returns component name."""
    match = re.match(r"DFG-%s-(.*?)-\d{1,2}" % (DFG_name), job_name)
    if match:
        return match.group(1)
    else:
        return ''