Before you begin, you must complete Exercise 3.7: Indenting source.
The LPEX Editor also has a powerful find and replace text feature. You use the Find and Replace window to search for an item. You can search for a word, a partial word, or a sequence of such. You can also enter a pattern you want to match, provided that the pattern follows the rules of regular expression. You can replace the found search item. If the entered text or pattern is found, the cursor moves to either the next or previous occurrence of the search item, according to your chosen search direction, and replaces the found text according to your selections.
To find and replace text:
Tip: When you press Ctrl+Home to go to the top of a file or Ctrl+End to go to the bottom of a file, a quick mark is set at your cursor position. This allows you to return to that line by pressing Alt+Q. Ctrl+Q will set a quick mark.
The Find/Replace window opens at the bottom of the Editor window.
At the bottom of this window, you will notice that you have some options to select from, for example, search only in certain columns, etc. You want to find the first occurrence of BEGSR.
You would use this field for text replacement.
The Editor moves the active line to line 52, which contains the first BEGSR phrase in the file.
You have searched for an item in your source using the Find/Replace window and now you are ready to begin Exercise 3.9: Filtering lines by string.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.