R/edit_money.R

Defines functions edit_money

Documented in edit_money

edit_money <- function(text, replacement = "<MONEY>"){

    x <- "(?<!\\w)(\U20AC|\U00A3|\U00A5|[$])([0-9,]+)(\\.\\d+)?(k|m|bn)?(?!\\w)"

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


    return(text)


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