R/edit_time.R

Defines functions edit_time

Documented in edit_time

load("data/time_regex.rda")

edit_time <- function(text, replacement = "<TIME>"){

    x <- time_regex$regex

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

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


    return(text)


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