Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

EVE REPLACE — VMS 5.2

 REPLACE

 Replaces one text string with another -- that is, EVE searches for the
 "old string" you specify and replaces it with the "new string" you
 specify.

 Steps:

    1.  Use the REPLACE command.
    2.  Type the old string (the text you want to find).
    3.  Type the new string (the text you want to use instead).

 Example:

    The following command replaces the old string ("butter") with the new
    string ("margarine"):

       REPLACE butter margarine

 o  If the old string is found, EVE highlights the text, and asks for one
    of the following choices:

       YES ..... (Default choice.)  Replace this one and find the next one.
       NO ...... Skip this one and find the next one.
       ALL ..... Replace all the occurrences (no further prompting).
       LAST .... Replace this one and stop here.
       QUIT .... Cancel -- skip this one and stop here.

    If the old string is not found, EVE tells you it replaced 0 occurrences.

 o  On DECwindows, if you choose Replace from a menu, EVE displays a dialog
    box for entering the old and new strings.  The dialog box also has an
    ALL button so you can specify a global replacement at the same time
    that you specify the old and new strings.

 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.

 o  If the old string is all lowercase, EVE searches for any occurrence
    regardless of its case in the buffer.  If the new string is also all
    lowercase, EVE matches the case appropriately for each replacement.
    For example, if EVE finds a capitalized version of the old string, it
    is replaced by a capitalized version of the new string.

 o  If the old string contains any uppercase letters, the search and
    replacement are exact (case-sensitive).  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

 o  On DECwindows, you can toggle case-sensitivity for searches --
    particularly useful to replace only lowercase strings:

       1.  Choose Global Preferences in the Customize menu.
       2.  Click MB1 on the Set Find Case Exact toggle button.

 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 string in
    a DECwindows dialog box):

       REPLACE "Samuel L. Clemens" "Mark Twain"

 o  After a REPLACE command, the old string becomes the search string for
    the next FIND.  Thus, using the FIND NEXT command or pressing the FIND
    key twice searches for the old string.

 Keys:  The WPS keypad defines both GOLD-; and GOLD-: as REPLACE.

 Related topics:

    FIND    FIND NEXT    WILDCARD FIND

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026