Section 7. Find and Replace Text

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

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.


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.

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.

Enter Search Text

Type the text you want to find in the Search for text box.


If you've searched for the same text before, you can click the down arrow to open the Search for drop-down list box and select the text to search for it once again.

Start a Search

Click the Find button. Writer searches from the current text cursor's position in the document to the end of the file. If Writer finds the text, it highlights the text. You may be able to see the highlighted text, but if not you can move or close the Find & Replace dialog box to see the highlighted text. (If you had clicked the Find All button instead of Find , Writer would have highlighted all occurrences of any matching text in the document.)

Type Replacement Text

If you want Writer to replace found text with new text, type the new text into the Replace with text box.

Replace the Text

If the Search for text is found, Writer replaces that text with the text you entered in the Replace with text box.

Replace All Occurrences

Instead of Replace (or after you do a replacement), if you click the Replace All button, Writer replaces all the matches with your replacement text throughout the document. Such a change is more global and possibly riskier because you may replace text you didn't really want replaced . By clicking Find before each replace operation, you can be sure that the proper text is being replaced; however, such a single-occurrence find and replacement takes a lot of time in a long document.

Find Previous Matches

Click to select the Backwards option before doing a find or replacement if you want to find or replace from the current text cursor's position back to the start of the document.

Search with Wildcards

Click to select the Regular expressions option if you want to perform a wildcard search using'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.


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

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

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.

Specify a Font to Find

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

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.

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.


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. 2, Firefox, and Thunderbird for Windows All in One
Sams Teach Yourself 2, Firefox and Thunderbird for Windows All in One
ISBN: 0672328089
EAN: 2147483647
Year: 2005
Pages: 232
Authors: Greg Perry © 2008-2017.
If you may any questions please contact us: