This page shows examples of multi-pair find ＆ replace in emacs lisp.
You need the elisp library
xah-replace-pairs.el at Emacs Lisp: Multi-Pair Find Replace: xah-replace-pairs.el.
These are very useful when you do text processing in emacs lisp. For example, if you need to process HTML, just copy raw HTML text, paste in emacs, then press a button to escape quote characters, and now you are ready to put them inside elisp string.
Useful if you work with math a lot such as LaTeX.
(require 'xah-replace-pairs) (defun xah-replace-greeks-to-symbols (φbegin φend) "Replace alpha to α etc in current line or selection. Version 2015-04-28" (interactive (if (use-region-p) (list (region-beginning) (region-end)) (list (line-beginning-position) (line-end-position)))) (xah-replace-pairs-region φbegin φend '( ["alpha" "α"] ["beta" "β"] ["gamma" "γ"] ["theta" "θ"] ["lambda" "λ"] ["delta" "δ"] ["epsilon" "φ"] ["omega" "ω"] ["Pi" "π"])))
You might need to modify it to include backslash, add more symbols, or change conversion direction.
The following is useful when you want to normalize the style of punctuation in essay or novel.
Another different use, but essentially same technique of find ＆ replace, is to convert a plain text table into a HTML table. See: Emacs Lisp: How to Write a make-html-table Command.