license_text <- readLines("docs/LICENSE-text.html") license_text <- paste(license_text, collapse = "|||") license_text <- gsub("licen(s|c)e", "Survey", license_text, ignore.case = TRUE) license_text <- gsub("
.*
", '

If no form is showing below, please click here to open it.

', license_text) writeLines(unlist(strsplit(license_text, "|||", fixed = TRUE)), "docs/survey.html")