Fandom

How To Wiki

How to search and replace in Emacs

1,795pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

search and replace within Emacs, You can do a standard search or use Regular expressions

  • Normal: Replace every occurrence of your_search_string with your_replace_string.
    Key sequence
    • M-x replace-string Enter your_search_string Enter your_replace_string Enter
  • Regular expressions: Replace every match for your_regexp with your_replace_string.
    Key sequence
    • M-x replace-regexp Enter your_regexp Enter your_replace_string Enter


  • M is the Meta key
  • Enter is the enter key

ReferencesEdit

Also on Fandom

Random Wiki