Exemple #1
0
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)
Exemple #2
0
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)