R/de_regex.R

Defines functions de_regex

#' @importFrom dplyr "%>%"
#' @importFrom stringr str_replace_all
#'
de_regex <- function(the_regex){
  the_string <- the_regex %>%
    str_replace_all(c('\\(\\?=[^\\)]+\\)'='',
                      '\\(\\?\\![^\\)]+\\)'='',
                      '\\(\\?<=[^\\)]+\\)'='',
                      '\\(\\?<\\![^\\)]+\\)'='',
                      ' (\\*)|(\\+)'='','\\.'='','\\*'='','\\\\'='',
                      '\\+'='','\\^'='','\\|'='',
                      '\\^'='','\\$'=''))
  return(the_string)
}
palderman/DSSAT documentation built on Feb. 24, 2024, 4:38 a.m.