How To Wiki

How to search and replace in Emacs

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

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


Also on Fandom

Random Wiki