R/gsub_html.R

#' Reorganize info from html file
#' @param txt a html text.
#'



gsub_html <- function(txt){
  txt <- gsub(pattern = "ü","ü",txt)
  txt <- gsub(pattern = "</strong>"," ",txt)
  txt <- gsub(pattern = "<br>"," ",txt)
  txt <- gsub(pattern = "<strong>"," ",txt)
  txt <- gsub(pattern = "ö","ö",txt)
  txt <- gsub(pattern = "ß","ß",txt)
  txt <- gsub(pattern = "ä","ä",txt)
  txt <- gsub(pattern = "<p>"," ",txt)
  txt <- gsub(pattern = "</p>"," ",txt)
  txt <- gsub(pattern = "</div>"," ",txt)
  txt <- gsub(pattern = "&amp","-",txt)
  txt <- gsub(pattern = "„","'",txt)
  txt <- gsub(pattern = "“","'",txt)
  txt <- gsub(pattern = "   "," ",txt)
  return(txt)
}
Japhilko/GPediting documentation built on May 3, 2019, 9:03 p.m.