Escapes the strings used in regexes