R/edit_URL.R

Defines functions edit_URL

Documented in edit_URL

load("data/internet_regex.rda")

edit_URL <- function(text, replacement = "<URL>"){

    x <- internet_regex[c("URL", "naked_URL"), ]

    x <- paste0('(?<!\\w)', x, '(?!\\w)')

    text <- mgsub_regex(text, x, replacement, perl = T)


    return(text)


}
achilleas-251/txtprocess documentation built on March 30, 2020, 12:43 a.m.