Convert a string to emacs regexp
Emacs
Suppose you want to convert a string (e.g., "\") to an emacs regexp representation. Then do evaluate the lisp code: (regexp-quote "\^{}"), which would yield \\\^{}. Remember, you can evaluate elisp with M-:.