OpenOffice.org 2, Firefox, and Thunderbird for Windows All in One [Electronic resources]

Greg Perry, M. T. Cozzola, Jennifer Fulton

نسخه متنی -صفحه : 231/ 23
نمايش فراداده

7. Find and Replace Text

3 Open an Existing Document

5 Edit Text

6 Move Around a Document

12 Apply Character Formatting

7. Find and Replace Text

[View full size image]

Long documents make quickly locating what you need important. Perhaps you need to make changes to some text in a table or perhaps a caption is wrong on a figure. Writer provides text-locating tools that will be familiar to you if you've done similar text-locating tasks in the past.

Of course, along with finding text, you'll need to replace the text you find sometimes. For example, you may have written a press release about a show at the Mill Run Theater and learned that the venue for the show has changed to the Ravenswood Theater. With Writer's Find and Replace tools, you can make quick work of changing all the Mill Run references to Ravenswood throughout the document. Whether the document is one page or 100 pages, you'll be able to find and replace text such as this just as quickly and easily.

NOTE

The

Navigator and the

Navigation toolbar are great for locating generic elements within your document, but use the

Find and Replace tools, shown in this task, to locate specific text and editing marks within your document.

1.

Find Text

Select the

Find & Replace option from the

Edit menu to display the

Find & Replace dialog box. You can also click the

Find & Replace toolbar button or press

Ctrl+F to display the

Find & Replace dialog box. Click the

More Options button to display all the Search options available in this dialog box.

2.

Enter Search Text

Type the text you want to find in the

Search for text box.Regular expressions option if you want to perform a

wildcard search using OpenOffice.org's

regular expressions . Table 2.3 describes some of the more common regular expressions you may use in the

Search for text box and gives an example of each.

Table 2.3. Regular Expressions That Form Advanced Wildcard Searches

Regular Expression Character

How Used

.

Represents one and only one character in a search. Therefore, h.s matches

his and

has but not

hands (similar to the question mark wildcard character in other programs).

^

Requests that a match be made only if the search term appears at the beginning of a paragraph. Therefore, ^The matches all occurrences of

The that begin paragraphs, but it does not match any other

The in the document.

$

Requests that a match be made only if the search term appears at the end of a paragraph. Therefore, success$ matches all occurrences of

success that fall at the end of paragraphs, but it does not match any other

success in the document.

*

Represents zero, one, or more characters. Therefore, i*n matches

in, i123n , and

ion .

\>

Represents a search term located at the end of a word. Therefore, \>door matches

outdoor and

indoor but not

doorknob .

\<

Represents a search term located at the beginning of a word. Therefore, \<door matches

doorknob but not

outdoor and

indoor .

^$

Locates empty paragraphs.

KEY TERMS

Wildcard search Allows you to use wildcard characters, such as *, to replace characters in a search.

Regular expressions The name given to OpenOffice.org's extensive wildcard character support; OpenOffice.org supports far more wildcard characters than most Windows programs.

9.

Search for Formatted Text

If you want to search only for certain text values that are formatted in a particular way, such as all italicized instances of Mill Run but not boldfaced instances of Mill Run, you can do so by clicking the

Format button to display the

Text Format (Search) dialog box.

10.

Specify a Font to Find

Select the font name, typeface, and size that the text must match before being considered found.

11.

Search for a Font Effect

If you want to further refine your search to a specific font color or effect, click the

Font Effects tab to display a page with those attributes you can look for.

12.

Choose a Font Effect

Select the font effect you want to find. If the matching text also matches the font effects you select (as well as any font name and size you may have selected in step 10), Writer considers the match to be successful and highlights the found text.

NOTE

Click the tabs on the other pages within the

Text Format (Search) dialog box to see the other refinements you can make when searching and replacing text. You can even specify the background color that must appear behind any matching text before the text is to be considered a match.

When you finish finding and replacing all the text for this search session, click the

Find & Replace dialog box's

Close button to close the dialog box and return to the document's work area.