1. Computing

Discuss in my forum

How To Use Search and Replace in Dreamweaver

By

Dreamweaver CS3

Dreamweaver CS3

Image courtesy Adobe

It's easy to use Adobe Dreamweaver to do a search and replace over either the current file, selected files, or every file in your Web site. And once you're used to using global search and replace, you'll wonder how you ever lived without it.

Difficulty: Easy
Time Required: 5 minutes

Here's How:

  1. To search in one file:
    Open the file to edit in Dreamweaver.
  2. Go to "Find and Replace" in the "Edit" menu, or click Ctrl-F/Cmd-F.
  3. Type the words to find in the find box and the words to replace in the replace box.
  4. Make sure "Current Document" is selected, and click "Replace". Keep clicking replace until Dreamweaver has replaced all the instances on the page.
  5. To search across an entire website:
    Open Dreamweaver and open a pre-defined Web site.
  6. In the folder list, highlight the files you'd like to search through.
  7. Go to "Find and Replace" in the "Edit" menu, or click Ctrl-F/Cmd-F.
  8. Type the words to find in the find box and the words to replace in the replace box.
  9. Make sure "Selected Files in Site" is selected if you only want to search some of the pages in your Web, "Open Documents" if you want to search only the files you've got open for editing, or "Entire Current Local Site" if you want to search all pages. Then click "Replace All".
  10. Dreamweaver will alert you that you won't be able to undo this operation. Click "Yes".
  11. Dreamweaver will then show you all the places where your search string was found. The results will be displayed in the Search pane below your site window.

Tips:

  1. In order to avoid matching on items that shouldn't be replaced, create a find string that is very specific. For example, the string "in" would be found inside words ("tin", "insider", etc.). You can include parts of your find phrase inside your replace phrase. For example, if you wanted to replace "in the matter of" with "on the matter of", you should include all the words in your search string and replace string. Just searching for "in" will result in every instance of those two letters being replaced with "on". Turning "tin" into "ton" and "insider" into "onsider".
  2. Dreamweaver allows you to select options to narrow down the search:
    • Match case matches the exact upper case or lower case of the text you type in. "In" will not match "in".
    • Match whole word will match only the word "in" and not "insider" or "tin".
    • Ignore whitespace will match phrases where there's a tab or a carriage return between the words, even if your search phrase had just a space.
    • Use regular expression lets you search with wildcard characters.
  3. Dreamweaver also allows you to search within a block of text or a specific folder on your hard drive. Select those options in the "Find In" drop-down box.
  4. Dreamweaver will search through the source code, inside just the page text, inside the tags (to find attributes and attribute values), or in an advanced text search to look in multiple tags.
  5. You can double click on the results to see what was changed, and make edits.

What You Need

  • Adobe Dreamweaver
  1. About.com
  2. Computing
  3. Web Design / HTML
  4. HTML Editors and Software
  5. HTML Editors - Web Page Authoring Tools
  6. Windows HTML Editors
  7. Dreamweaver
  8. Dreamweaver Tutorials
  9. Search and Replace in Dreamweaver - How to Use Search and Replace in Dreamweaver - Find and Replace in Dreamweaver

©2014 About.com. All rights reserved.