GNU Emacs Manual. Node: Search

PREV Display UP Top NEXT Fixit

Chapter 10: Searching and Replacement

Like other editors, Emacs has commands for searching for occurrences of a string. The principal search command is unusual in that it is incremental; it begins to search before you have finished typing the search string. There are also nonincremental search commands more like those of other editors.

Besides the usual replace-string command that finds all occurrences of one string and replaces them with another, Emacs has a fancy replacement command called query-replace which asks interactively which occurrences to replace.

  • Incremental Search Search happens as you type the string.
  • Nonincremental Search Specify entire string and then search.
  • Word Search Search for sequence of words.
  • Regexp Search Search for match for a regexp.
  • Regexps Syntax of regular expressions.
  • Search Case To ignore case while searching, or not.
  • Replace Search, and replace some or all matches.
  • Other Repeating Search Operating on all matches for some regexp.
  • PREV Display UP Top NEXT Fixit