def clean_string(s: str) ->str:
    """
    a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.',
    and must start and end with an alphanumeric character (
    e.g. 'example.com', regex used for validation is
    '[a-z0-9]( [-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'

    'must be no more than 63 characters'
    """
    return s.replace('/', '-').replace(':', '-').replace('_', '-').replace('.',
        '-').replace('--', '-')[-63:]
