def replace_numeric(text, numeric_pattern=re.compile('[0-9]+'), digit_pattern=re.compile('[0-9]'), repl='#', by_single_digit=False):
    return (re.sub(numeric_pattern, repl, text) if by_single_digit else re.sub(digit_pattern, repl, text))
def replace_numeric(text, numeric_pattern=re.compile('[0-9]+'), digit_pattern=re.compile('[0-9]'), repl='#', by_single_digit=False):
    return (re.sub(numeric_pattern, repl, text) if by_single_digit else re.sub(digit_pattern, repl, text))