TIP 204: Using Find and Replace in a Document


Situation: You've landed a job renovating the neglected Web site of a medium-sized business. None of the pages is currently based on a template, nor is data stored in a database. You have every intention of implementing both of those features in the future, but the task at hand is to immediately correct and update the information on the static pages.

Save yourself a lot of time by using Find and Replace to quickly handle these kinds of edits. The Find commands are found in the Edit menu. A number of sub-menu items are nested under Find: Find Text, Find Next, Find Previous, Find Selection, Enter Find String, Replace, Replace & Find Next; some of these options will be grayed out until you've performed at least one find operation. Knowing when and how to use these commands is the key to successfully performing edits with ease.

Open the page where you want to perform a Find operation, choose Edit > Find > Find Text, and choose Top Document from the pulldown menu at the bottom. You can type, paste, or drag text or syntax into the input box at the top (Figure 204).

Figure 204. To run a Find operation on the active page, choose Top Document from the menu at the bottom of the Find Text window.


Toggle open the Options section to select options for your search:

  • Match Case : Enable Match Case if you want the case of letters to be consideredfor example, you want to find web but not Web.

  • Entire Word: Select Entire Word if you want a word to be found only if it exists on its ownfor example, to find hand but not handsome.

  • Regular Expression: Enable Regular Expression if you want to use wildcards in your search operation, but be careful! If you don't know what you're doing, you could wreak havoc on your pages.

  • From Top: If you click From Top, the search will start at the top of the page. Otherwise it will begin at the location of the cursor.

  • Wrap Around: Wrap around will perform the search from the cursor to the end of the page and then go to the top and end up back at the cursor position again.

  • In Selection: To run the find operation on the current selection only, enable In Selection.

Look What I Found!

GoLive has a clever feature that enables you to run additional searches without reopening or bringing the Find Text window back into focus. If you've previously run a search, you'll notice that additional Find commands such as Find Next become available in the Find submenu. Simply by using the associated keyboard shortcuts, you can run find operations on your page without even using the Find Text window!


Note

To search for text, run the Find operation in the Layout, Source, or Outline Editor; to search for syntax, use the Source or Outline Editor.


To replace the found text with different text, type the replacement into the Replace input box. With your options selected and replacement in place, you're ready to run the search. To begin, click the Find button. If a match is found, it will be highlighted on the page. Click Find Next to move on to the next instance or click Replace to replace the found item with what you have in the Replace input box. Click Replace & Find to both replace the found item and move on to the next instance. If you want to replace all found instances, click Replace All.



    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