def replace_phone_numbers(text, replace_with='<phone>'): """Replace all phone numbers in ``text`` str with ``replace_with`` str.""" return PHONE_REGEX.sub(replace_with, text)
def replace_phone_numbers(text, replace_with='*PHONE*'): """Replace all phone numbers in ``text`` str with ``replace_with`` str.""" return PHONE_REGEX.sub(replace_with, text)