Chapter 22. Find and Replace

You’ve probably encountered find-and-replace tools in word processing programs and even some graphics software. As its name implies, the command finds a piece of text (webmaster, for example) and replaces it with another piece of text (webmistress). Like Microsoft Word, Dreamweaver can search and replace text in the body of your web pages. But it also offers variations on this feature that enhance your ability to work within the tag-based world of HTML.

What’s more, Dreamweaver lets you find and replace text on every page of your site simultaneously, not just the current, open document. In addition, you can remove every appearance of a particular HTML tag, or search and replace text that matches very specific criteria. For example, you can find every instance of the word “Aardvark” that appears within a paragraph styled with the class name animal. These advanced find-and-replace maneuvers are some of the most powerful—and under-appreciated—tools in Dreamweaver. If you learn how to use them, you can make changes to your pages in a fraction of the time it would take using other methods.

Tip

You can use Find and Replace feature to search an entire site’s worth of files. This is powerful, but it can also be slow, especially if some folders hold files you don’t want to search—old archives, for example. You can use Dreamweaver’s cloaking feature to hide files from find-and-replace operations. See Cloaking Files for details.

Find and Replace Basics

To start a search, ...

Get Dreamweaver CS5.5: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.