import re


def _get_id_from_url(url):
    """
    :param url: the race url to be parsed
    :return: mtec id of the requested race (str, none if not present)
    """
    KEY = "race/show/"
    key_regex = re.compile(KEY + "[0-9]+")
    match = key_regex.search(url)
    if match:
        return match.group(0).lstrip(KEY)
    return None