From Markdown Mapper, which is GPLv2-licensed (but release this section under the Public Domain? – so Markdown Mapper overall is still GPLv2, but this can be used however):

We may want, e.g., to use ‘ = TRUE’ for gsub below, which means NOT using ‘fixed = TRUE’. So we need to escape all of the characters in the ‘From’ column that could be interpreted as regular expression characters: deactivate_regular_expression_special_characters <- function(string_to_sanitize){ list_of_regular_expression_symbols_to_escape <- c( # Following the list at http://stackoverflow.