home *** CD-ROM | disk | FTP | other *** search
/ Shareware Gold 1 / The_Golden_ROM_Series_-_Shareware_Gold_Volume_1_Number_11_-_SK_89-301_-_1989.iso / LIB017 / FIND_REP.HLP < prev    next >
Text File  |  1986-10-01  |  4KB  |  129 lines

  1.                                FIND and REPLACE
  2.  
  3.     The Find and Replace instruction in PC-TYPE+ has 4 basic modes:
  4.  
  5.     (1) Find the string regardless of case toward the end of the
  6.         file and replace it with a new string.     /String1/String2/
  7.  
  8.     (2) Find the string identical in case toward the end of the
  9.         file and replace it with a new string.     \String1\String2\
  10.  
  11.     (3) Find the string regardless of case toward the beginning of the
  12.         file and replace it with a new string.    -/String1/String2/
  13.  
  14.     (4) Find the string identical in case toward the beginning of the
  15.         file and replace it with a new string.    -\String1\String2\
  16.  
  17.  
  18.  
  19.                               Press the PgDn Key
  20.  
  21.  
  22.  
  23.     The first example below is a case insensitive find and replace
  24.     toward the end of the file.  You will be replacing the string aaaa
  25.     with the string BBBBB in this exercise.  Follow the instructions
  26.     provided.
  27.  
  28.  
  29.     Move the cursor to the asterisk below, and then press the Esc key to
  30.     move the cursor to the Command Line.│ On the Command Line, type
  31.                                         │
  32.                     /aaaa/BBBBB/        │
  33.                                         
  34.     and press the Enter key.           (*)
  35.  
  36.     Answer the first two questions by pressing the 'Y' key.  Answer the
  37.     third question by pressing the 'X' key to make a Global Change.
  38.  
  39.  
  40.     aaaa   Aaaa  aAaa  aaAa aaaA AAAA  (Press the PgDn key)
  41.  
  42.  
  43.     The messages you encountered provide you with the flexibility you
  44.     need.
  45.  
  46.     (1) Replace? (y/n - or x --> Yes and don't ask)
  47.         If you respond with Y, the substitution will be made as you saw.
  48.         If you respond with X, the substitution will be made to the string
  49.         located and all subsequent strings in the file, again as you saw.
  50.         If you respond with N, no substitution will be made and the next
  51.         question will be presented.
  52.  
  53.     (2) Find NEXT? (y/n - or x --> Yes and don't ask)
  54.         Y will go to the next occurrence of the string and repeat (1).
  55.         N will end the "search and replace" feature of PC-TYPE+.
  56.         X will make the substitution at all subsequent locations in the
  57.         file.
  58.  
  59.                               Press the PgDn Key
  60.  
  61.     It's that easy.  Incidentally, if at any point you want to STOP
  62.     the Find and Replace process, press the ESC key.           ----
  63.                                   -----------------
  64.  
  65.  
  66.     If you want to replace the string in a similar fashion toward the
  67.     beginning of the file, you merely start the instruction on the Command
  68.     Line with a minus sign.  Place the cursor on the asterisk below.─┐
  69.                                                                      │
  70.      ┌───────────────────────────────────────────────────────────────┘
  71.      │  Then press the Esc key to move the cursor to the Command Line and
  72.      │  type:
  73.      │         -/cccc/DDD/  (When this line is on the bottom, press PgDn)
  74.      │
  75.      │  then press the Enter key and answer the question by pressing the
  76.      │  X key.
  77.                         cccc  Cccc cCcc ccCc cccC CCCC
  78.     (*)
  79.  
  80.  
  81.  
  82.  
  83.                           (PRESS the PgDn key again!)
  84.  
  85.  
  86.  
  87.  
  88.  
  89.     As you saw above, the string to be replaced would be found regardless
  90.     of case in either direction.
  91.  
  92.     If you wanted to distinguish between eeee and Eeee, the only
  93.     difference you would need to make on the Command Line would be to
  94.     replace the '/' characters with '\' characters.  For example,
  95.  
  96.     \The\For\
  97.  
  98.     on the Command Line would replace every occurrence of "The" with "For"
  99.     toward the end of the file.  A string "the" would not be recognized
  100.     as a find string.
  101.  
  102.     Similarly, to replace all the "The"s with "For"s toward the beginning
  103.     of the file, you would type
  104.  
  105.     -\The\For\        on the Command Line.
  106.  
  107.                               Press the PgDn Key
  108.  
  109.  
  110.  
  111.  
  112.     Place the cursor on the asterisk below and press the Esc key to go to
  113.     the Command Line.  On the Command Line type:
  114.  
  115.     \Ffff\Ggg\
  116.  
  117.     and press the Enter key.
  118.  
  119.     Answer the question with X.  Notice that only those strings which
  120.     are IDENTICAL in case to Ffff are changed to Ggg.
  121.  
  122.  
  123.     (*)
  124.  
  125.  
  126.  
  127.  
  128.     Ffff fFff ffFf fffF Ffff ffff  (Press F4 to return to the Help Menu)
  129.