import re


def no_whitespace_or_punct(line: str) -> str:
    """
    Remove whitespace and punctuation from string

    Args:
        line: String to remove whitespace and punctuation from
    Returns:
        A string with the whitespace and punctuation removed
    """
    # remove whitespace
    newstr = line.replace(' ', '')

    # remove punctuation besides "'" and "+"
    non_phonetic_punc = r"[.?!,*%$=\\/[\]()\";]*"
    newstr = re.sub(non_phonetic_punc, '', newstr)

    return newstr