def clean_doi(doi):
    """
    Cleans doi to match expected string format.
    Removes leading 'https://'  and 'doi.org/' from the string

    Parameters
    ----------
    doi : str
        A string containing a DOI

    Returns
    -------
        DOI string with extraneous characters removed
    """
    if doi.startswith('https://doi.org/'):
        return doi.replace('https://doi.org/', '')
    elif doi.startswith('doi.org/'):
        return doi.replace('doi.org/', '')
    elif doi.startswith('http://dx.doi.org'):
        return doi.replace('http://dx.doi.org/', '')
    elif doi.startswith('doi: '):
        return doi.replace('doi: ', '')
    elif doi.startswith('doi:'):
        return doi.replace('doi:', '')
    else:
        return doi