Escapes the characters that have a meaning in regular expressions, so that a string (a name, a title, a file prefix) can be searched literally inside a larger pattern.
Details
The copies of this function in the author's projects (escaping_regex())
did not escape the backslash; this one does.
See also
Other normalisation:
collapse_or_na(),
na_if_sentinel(),
normalise_for_matching(),
split_author_string()