Skip to contents

This function returns a character vector with the names of all redact functions defined in the redacted package.

Usage

default_redact_functions()

Value

A character vector with the names of all redact functions.

Examples

default_redact_functions()
#> $redact_credit_card_numbers
#> function (text, replace_with = NULL) 
#> {
#>     pattern <- "\\b(?:\\d[ -]*?){13,16}\\b"
#>     redact_pattern(text, pattern, replace_with)
#> }
#> <bytecode: 0x55cae178aa20>
#> <environment: namespace:redacted>
#> 
#> $redact_email_addresses
#> function (text, replace_with = NULL) 
#> {
#>     pattern <- "\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(?:\\.[A-Za-z]{2,})?\\b"
#>     redact_pattern(text, pattern, replace_with)
#> }
#> <bytecode: 0x55cae178b858>
#> <environment: namespace:redacted>
#> 
#> $redact_ip_addresses
#> function (text, replace_with = NULL) 
#> {
#>     pattern <- "\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b"
#>     redact_pattern(text, pattern, replace_with)
#> }
#> <bytecode: 0x55cae1786ac8>
#> <environment: namespace:redacted>
#> 
#> $redact_phone_numbers
#> function (text, replace_with = NULL) 
#> {
#>     pattern <- "\\(\\d{3}\\) \\d{3}-\\d{4}|\\d{3}-\\d{3}-\\d{4}|\\d{10}"
#>     redact_pattern(text, pattern, replace_with)
#> }
#> <bytecode: 0x55cae1787a50>
#> <environment: namespace:redacted>
#> 
#> $redact_pins
#> function (text, replace_with = NULL) 
#> {
#>     pattern <- "\\b\\d{4}\\b"
#>     redact_pattern(text, pattern, replace_with)
#> }
#> <bytecode: 0x55cae1788818>
#> <environment: namespace:redacted>
#> 
#> $redact_social_security_numbers
#> function (text, replace_with = NULL) 
#> {
#>     pattern <- "\\b\\d{3}-\\d{2}-\\d{4}\\b"
#>     redact_pattern(text, pattern, replace_with)
#> }
#> <bytecode: 0x55cae1785820>
#> <environment: namespace:redacted>
#> 
#> $redact_website_urls
#> function (text, replace_with = NULL) 
#> {
#>     pattern <- "(https?://)?(www\\.)?[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,5}(:[0-9]{1,5})?([/?#][^\\s]*)?"
#>     redact_pattern(text, pattern, replace_with)
#> }
#> <bytecode: 0x55cae1786850>
#> <environment: namespace:redacted>
#>