import re


def clean_domain_strings(domains):
    """
    This function is used to normalize input domain passed from the command line
    by the user. Basically we want to be able to handle both domains passed in
    the form example.com but also domains passed erroneously with a scheme, such
    as https://example.com

    Args:
    domains -- the list of input domains

    Returns:
    subdomains -- the list of normalized domains
    """
    domains = [item.rstrip('/') for item in domains]
    domains = [re.sub(r'(http://|https://)', '', item) for item in domains]
    return domains