
68
4.5.3 Replacing Text
Replacing text is similar to finding text, as discussed in the previous section. The difference is that when the text
is found you have the option to replace it with other text.
To replace text in a file:
1. Ensure that the window, whose contents you want to replace, is the active window.
2. Position the insertion cursor at the point from which you want to start your search.
3. Select [Edit->Replace...], press CTRL+H or select [Replace...] from the editor window’s local menu. A
replace dialog box will be displayed (figure 4.4).
4. Enter the text that you want to search for into the “Find what” field, or select a previous search string
from the drop-down list box. If you select text before invoking the replace operation, the selected text will
be automatically placed into the “Find what” field.
5. Enter the text that you want to replace the search string with into the “Replace with” field, or select a
previous replace string from the drop-down list box.
Figure 4.4: Replace Dialog
6. If you would like to search for character string as a whole word then check the “Match whole word only”
check box. When this option is not selected, the search will be for any string that is matched by the search
string.
7. If you would like your search to be case sensitive (i.e. to distinguish between upper and lower case
letters) then check the “Match case” check box.
8. If your search string uses regular expressions then check the “Regular expressions” check box. Refer to
appendix B, “Regular Expressions” for further information.
9. If you clicked “Find Next”, the editor will search for the first occurrence of the search string. Click
“Replace” if you want to replace it. Click “Replace All” to replace all occurrences or click “Cancel” to
stop the replace action. If you select “Selection” in “Replace In”, selected range of the text is replaced. If
you select “whole file”, the whole files are replaced. If you select all open files, all files that are
currently open in the editor have the replace operation carried out on them.
Komentarze do niniejszej Instrukcji