import re


def cleaning(text):
    """
    Cleans the provided text by lowering all letters, removing urls, removing emails,
    substituing punctuations with spaces
    Args:
        text (str): Input string to be cleaned

    Returns:
        text: cleaned text
    """
    text = text.lower()
    text = re.sub('http\S+', '' , text)
    text = re.sub('\S*@\S+', '', text)
    
    # Sub-ing punctuation with whitespace.
    # text = re.sub(r'[<.*?>;\!()/,:&\\]+', ' ', text)

    # Removing everything except numbers, capital & small letters
    text = re.sub(r'[^0-9A-Za-z\s]', '', text)

    # Remove multiple whitespace to single whitespace
    # text = re.sub(r'\w+', ' ', text)
    # Removing everything except numbers, capital & small letters & hyphens
    # text = re.sub(r'[^0-9A-Za-z\-\s]', '', text)

    # Example statement for removing words with numbers in them
    # re.sub('\w*\d\w*', ' ', clean_text)

    # Alternate version of removing all punctuations only
    # re.sub('[%s]' % re.escape(string.punctuation), ' ', my_text)

    return text