Find and replace Google Docs

The Find and replace dialog is simpler than those in Microsoft Word for Windows, LibreOffice, and Microsoft Word for Mac. It allows you to Match case and Match using regular expressions.

Find and Replace allows users to find any text in a document and replace it with others. Regular Expressions also can be used.

The dialog consists of

  • Find text box
  • Replace with text box
  • Two check boxes
  • Four buttons

Type text in the Find text box to highlight matching text in the document. This is for normal searches. Regular expressions are discussed below.

If you are going to replace the text that you search for, type the desired words or string of characters in the Replace with field.

A check in the Match case checkbox means that text in the document that doesn’t match the string of characters in the Find field exactly, it will not be highlighted.

The five buttons for finding and replacing text:

  • Replace: This replaces the highlighted text that matches the characters in the Find field with those that are in the Replace with field.
  • Replace all: This replaces every instance of the characters in the Find field with those in the Replace with field at the same time.
  • Previous: This starts where the cursor is located and highlights character that match those in the Find field, going from right to left, bottom to top.
  • Next: This starts where the cursor is located and highlights character that match those in the Find field, going from left to right, top to bottom.

There are two ways to launch the the dialog.

  • Clicking the Edit menu. Then clicking the Find and replace menu item.
  • By using the keystrokes.
    • For Windows and Linux distros: Ctrl + Shift + H.
    • Mac users: Cmd + Shift + H

Regular Expressions

These are symbols that you enter in the Find text box that allows you to do advanced searches in a document. Google has a page in its help section for Find and Replace. The page has several examples for regular expressions.

These expressions work in Docs and Sheets. This page has a list of expressions to use in Docs, taken from the link in the previous paragraph.