• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Lesson 14. Using Find and Replace > Searching Your Document

Searching Your Document

In this exercise, you will perform a simple search in order to find and replace words in the text of a document.

Open the women.html file from the Lesson_14_Find folder. Place the insertion point at the end of the header “Women of the Lights.”

This document refers to “lite house keepers” throughout the text, when it should actually be “lighthouse keepers.” You'll replace that text in this exercise.

Choose Edit gt; Find and Replace.

The Find and Replace dialog box opens.

In the Find In drop-down menu, choose Current Document. In the Search For drop-down menu, choose Text. In the Search For text field, type lite house keepers. In the Replace With text field, type lighthouse keepers. Uncheck the boxes for all three options.


Selecting a portion of text before opening the Find and Replace dialog box will automatically cause the selected text to appear in the Search For text field.

Find in Current Document will search the entire document. This can only be used from a single document while it is open. The Find In drop-down menu also has additional options:

  • Entire Local Site will search the whole current site.

  • Selected Files in Site will search files you specify and should be used while viewing the site window so you can select the files.

  • Folder will allow you to browse in order to select a folder and search all the contents of that folder.

There are three other options at the bottom of the Find and Replace dialog box:

  • Match Case limits the search to the exact case of the words. If the Match Case box is checked, a search will look for only the exact phrase you entered.

  • Ignore Whitespace Differences ignores all spaces. If this is checked and you are searching for two words, Dreamweaver will also find all instances where those two words have additional spaces between them.

  • Use Regular Expressions provides patterns to describe character combinations in the text. Use this option to select sentences that begin with “The” or attribute values that contain a number.

Click Find Next.

The first occurrence of the phrase after the insertion point is highlighted.

Click Replace.

The phrase is changed to “lighthouse keepers,” and the next occurrence of the phrase is highlighted.


When replacing text in your document, it is recommended that you click Replace first and check the new text to make sure you typed the correct information in the Replace field. After you verify the search criteria, then use Replace All.

The Results window opens. It may be blank initially; you should leave it open.

Click Find All.

Three more instances of the text you are searching for are found and displayed in the Results window. Double-clicking an item in this list will highlight the instance in the document window.

Click the green arrow on the left of the Results window.

The Find and Replace dialog box opens again.


Dreamweaver remembers the settings from your most recent search. If you close and reopen the dialog box, the text and options you set the last time the dialog box was open will still be there.

Now click Replace All on the Find and Replace dialog box.

The remaining text is all changed and a message box appears, reporting the number of items found and replaced in your document.

The Find and Replace dialog box will automatically close once it has finished searching for and replacing text.

Click OK to close the message box. Click the context menu in the upper right corner of the Results window and choose Clear Results; then close the Results window. Save the women.html document.

Leave this file open for the next exercise.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint