Emacs regexp replace -- Python print to logging 04 Jan 2012 related: emacs , regexp , python Handy replace-regex emacs command to convert print statements to logging.debug statements in Python 2.X. match: **print\s-+\(“.\*\)** replace: **logging.debug(\1)**