TIP 205: Using Find and Replace in Multiple Documents


The Find Text window has a drop-down list labeled Work On that enables you to run searches on more than one document at a time. Choose an option from this list if you need to perform a global Find and Replace operation across multiple pages in a site, on a selection of pages, on the Files or Extras tabs, or on a Collection or Query (Figure 205a). The options in this section are the same as those used in the Top Document area (see Tip 204). The difference here is that you must specify whether to search for text in Layout Mode or Source Mode by clicking the appropriate radio button.

Figure 205a. You can search your whole site, a selection of files, or particular tabs of the Site window.


If you elect to search for text, you'll see the standard Replace options in the input box below. If, however, you need to search for Code Elements, select Find Code Elements from either the Find window menu or choose Edit > Find > Find Code Elements. Upon doing so, the Find window changes to display a series of pull-down lists that allow you to customize your search. Toggling open the Change portion shows options for how the found element should be treated. Use the plus and minus buttons to add or delete criteria to your search. If you are adept at using regular expressions, you can click the Advanced button and type in your own grep patterns (Figure 205b).

Figure 205b. The Find Code Elements window is very robust allowing you to run incredibly granular searches based on multiple criteria.


Click Find All to find all matches. In the Results window, a number in the Hits column indicates how many times the item was found in each searched document (Figure 205c). You can also select whether to show Matches Only, Non-matches Only, or to Show All by selecting one of those options from the popup list. Double-click a file in the results list to open the file and see the first match highlighted.

Figure 205c. The results list not only shows which documents contain the found item, but how many times the item was found within each page.




    Adobe GoLive CS2 Tips and Tricks The 250 Best
    Adobe GoLive CS2 Tips and Tricks The 250 Best
    ISBN: B008CMGJS0
    EAN: N/A
    Year: 2005
    Pages: 301

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net