import re


def clean_str(text):
    """clean the string from unusable characters, numbers, etc.

    Parameters
    ----------
    text : str
        the input string/text

    Returns
    -------
    str
        the cleaned string/text
    """
    text = str(text)
    # replace word binding
    # replace Umlaute
    text = re.sub(r'ẞ', 'ss', text)
    text = text.lower()
    text = re.sub(r'sz', 'ss', text)
    text = re.sub(r'ä', 'ae', text)
    text = re.sub(r'ö', 'oe', text)
    text = re.sub(r'ü', 'ue', text)
    # URLs
    text = re.sub(r'url?:\/\/.*[\r\n]*', '', text, flags=re.MULTILINE)
    text = re.sub(r'https?:\/\/.*[\r\n]*', '', text, flags=re.MULTILINE)
    text = re.sub(r'http\S+', '', text, flags=re.MULTILINE)
    text = re.sub(r'html', '', text, flags=re.MULTILINE)
    text = re.sub(r'url', '', text, flags=re.MULTILINE)
    # Linebreaks
    text = re.sub(r'(?<!\\)(\\\\)*\\n|\n', '', text, flags=re.MULTILINE)
    text = text.replace('- ', '').replace(' -', '').replace('-', '')
    text = re.sub(r'[^a-zA-Z\s]', '', text, flags=re.MULTILINE)
    # multi letters >2 times
    text = re.sub(r'(.)\\1{2,}', '', text, flags=re.MULTILINE)
    # alphabetic 
    text =  re.sub(r"\b[a-zA-Z]\b", '', text, flags=re.MULTILINE)
    # remove any whitespaces
    text = re.sub(r'\s+', ' ', text, flags=re.MULTILINE)
    return text