def get_job_id(response):
    """Return the job id from the response of the sbatch command"""
    import re
    match = re.search('Submitted batch job (\\d+)\\s*$', response)
    if match:
        return match.group(1)
    else:
        return None
