# NOT RUN {
temp_file <- file.path(tempdir(), ".gitignore")
content <- c("doc", "Meta", ".RData", "*.tar.gz", "doc/*")
cat(content, sep = "\n")
writeLines(content, temp_file)
cat(remove_lines(temp_file, c("^doc$", "^doc/.*$")), sep = "\n")
cat(readLines(temp_file), sep = "\n")
# }
Run the code above in your browser using DataLab