R/clean_wiki.R

Defines functions clean_wiki

Documented in clean_wiki

#' Clean Your Wiki
#'
#' This function accepts a string and removes new line indentations and html tags with regex
#' @param string The string to be cleaned
#' @export
#' @examples
#' clean_wiki("<p>some text</p>")

clean_wiki <- function(string) {
  string = gsub("\n", "", string)
  return(gsub("<.*?>", "", string))
}

Try the getwiki package in your browser

Any scripts or data that you put into this service are public.

getwiki documentation built on May 12, 2022, 9:06 a.m.