REPLACE Searches for the "old string" you specify and replaces it with the "new string" you specify. Key: The WPS keypad defines GOLD-: and GOLD-; as REPLACE. Steps: 1. Use the REPLACE command (see key list above). 2. Type the old string---the text you want to find. 3. Type the new string---the text you want to use instead, if any. Example: The following command replaces the old string ("butter") with the new string ("margarine"): Command: REPLACE butter margarine Usage notes: o The search begins in the current direction. If the old string is not found in that direction, EVE automatically searches in the opposite direction. If the old string is found in the opposite direction, EVE asks if you want to change direction and go there---press RETURN for Yes, or type No and press RETURN. o If the old string is found, EVE highlights the text, and asks you for one of the following choices: YES .... (Default.) Replaces this one and find the next one. NO ..... Skips this one and finds the next one. ALL .... Replaces all the occurrences in the current direction. LAST ... Replaces this one and stops here. QUIT ... Cancels---skips this one and stops here. (Replying with ALL is the same as using the GLOBAL REPLACE command.) o If the search covers the buffer more than once, EVE asks if you want to continue, so you can avoid replacing a string again when the old and new strings are similar. When the operation finishes, EVE tells you how many replacements were made. If the old string is not found, EVE tells you it replaced 0 occurrences. o By default, if the old string is all lowercase, EVE searches for any occurrence regardless of its case in the buffer. If the old string has any uppercase letters, EVE searches for an exact match. To find and replace lowercase occurrences only, use SET FIND CASE EXACT. o If the new string is also all lowercase, EVE tries to match the case appropriately for each replacement. For example, a capitalized version of the old string is replaced by a capitalized version of the new string; an all uppercase old string is replaced by an all uppercase new string; other versions of the old string are replaced by lowercase versions of the new string. o If the new string contains any uppercase letters, the replacement is case exact. The following table shows how EVE uses the case of the strings: Old string New string Highlights Replacements ---------------------------------------------------- butter margarine butter margarine Butter Margarine BUTTER MARGARINE BuTtEr margarine Butter margarine Butter margarine butter Margarine butter Margarine Butter Margarine BUTTER Margarine BuTtEr Margarine Butter Margarine Butter Margarine o To replace phrases (several words), let EVE prompt you for the strings or put them in quotes, as follows (unless you are typing the strings in a DECwindows dialog box): Command: REPLACE "Samuel L. Clemens" "Mark Twain" To replace a paragraph or several lines, use the EDT/WPS Replace key or the EDT Subs key. o After REPLACE, the old string becomes the search string for the next FIND. Thus, using FIND NEXT or pressing the FIND key twice searches for the old string. Related topics: FIND FIND NEXT GLOBAL REPLACE SET FIND CASE EXACT WILDCARD FIND