How to Use Search and Replace in Dreamweaver
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 website. Once you’re used to using global search and replace, you’ll wonder how you ever lived without it. Learn how in just five minutes.
To search in one file, open the file to edit in Dreamweaver. Go to “Find and Replace” in the “Edit” menu or click Ctrl-F/Cmd-F. Type the words to find in the find box and the words to replace in the replace box. Make sure “Current Document” is selected and click “Replace.” Keep clicking replace until Dreamweaver has replaced all the instances on the page.
To search across an entire website, open Dreamweaver and open a pre-defined Web site. In the folder list, highlight the files you’d like to search through. Go to “Find and Replace” in the “Edit” menu or click Ctrl-F/Cmd-F. Type the words to find in the find box and the words to replace in the replace box.
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.”
Dreamweaver will alert you that you won’t be able to undo this operation. Click “Yes.” 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.
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”.
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.
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. Dreamweaver will search through thesource 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.
You can double click on the results to see what was changed and make edits.