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

Lesson 12. 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 a company name in the text of a document.

Open the welcome.htm file from the Lesson_12_Search folder.

This file gives the company name as Compass Adventure Tours. The name needs to be changed to Compass Adventure Travel.

Choose Edit > 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 box, type Compass Adventure Tours. In the Replace With text box, type Compass Adventure Travel. Check the Match Case box and uncheck the other two boxes.


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 box.

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.


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.

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. Because you checked Match Case, the search will look for a phrase with the exact capital and lower-case letters of the 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 “Compass Adventure Travel,” and the next occurrence of the phrase is highlighted.

Click Replace All.

The remaining names are all changed and a message box appears, reporting the number of items found and replaced in your document. A list of all the changed text appears at the bottom of the Find and Replace dialog box. You can double-click any of the items in the list; the replaced text highlights in the document window to let you know the location of the changes made.


When replacing text in your document, always 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.

Click OK to close the message box and click Close to close the Find and Replace dialog box. Save this 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