Skip to contents

Redacts an email addresses from a given string

Usage

redact_email(string, hash_spotted = FALSE, replace_with = "EMAILADDRS")

Arguments

string

A character vector with, at most, one element. The input string to redact email addresses from

hash_spotted

When TRUE, the redaction of the email addresses will be a hash of the redacted (Default False)

replace_with

A character vector with, at most, one element. When hash_spotted is FALSE, this character vector will be the replacement redacted email addresses.

Value

A character vector.

Examples

x <- "my email address is foo@gaga.com"
redact_email(x)
#> [1] "my email address is EMAILADDRS"