import re


def handle_substitute(text: str, ptn: str, repl: str) -> str:
    """替换一些字符

    Attributes:
        text: input text
        ptn: re pattern
        repl: replace text
    """
    return re.sub(ptn, repl, text)