import re


def pattern_matching(text: str) -> str:
    """
    A regex based pattern matching function to remove the unwanted characters in the text.
    :param text:    The input text (str).
    :return:        A text without the patterns.
    """
    patterns = re.compile(pattern="["
                                  r"[-+]?\d*\.\d+|\d+"
                                  r"([!\.\?؟]+)[\n]*"
                                  r":\n"
                                  r";\n"
                                  r'؛\n'
                                  r'[\n]+'
                                  "]+", flags=re.UNICODE)
    return str(patterns.sub(r'', text))