home *** CD-ROM | disk | FTP | other *** search
- FIND and REPLACE
-
- The Find and Replace instruction in PC-TYPE+ has 4 basic modes:
-
- (1) Find the string regardless of case toward the end of the
- file and replace it with a new string. /String1/String2/
-
- (2) Find the string identical in case toward the end of the
- file and replace it with a new string. \String1\String2\
-
- (3) Find the string regardless of case toward the beginning of the
- file and replace it with a new string. -/String1/String2/
-
- (4) Find the string identical in case toward the beginning of the
- file and replace it with a new string. -\String1\String2\
-
-
-
- Press the PgDn Key
-
-
-
- The first example below is a case insensitive find and replace
- toward the end of the file. You will be replacing the string aaaa
- with the string BBBBB in this exercise. Follow the instructions
- provided.
-
-
- Move the cursor to the asterisk below, and then press the Esc key to
- move the cursor to the Command Line.│ On the Command Line, type
- │
- /aaaa/BBBBB/ │
-
- and press the Enter key. (*)
-
- Answer the first two questions by pressing the 'Y' key. Answer the
- third question by pressing the 'X' key to make a Global Change.
-
-
- aaaa Aaaa aAaa aaAa aaaA AAAA (Press the PgDn key)
-
-
- The messages you encountered provide you with the flexibility you
- need.
-
- (1) Replace? (y/n - or x --> Yes and don't ask)
- If you respond with Y, the substitution will be made as you saw.
- If you respond with X, the substitution will be made to the string
- located and all subsequent strings in the file, again as you saw.
- If you respond with N, no substitution will be made and the next
- question will be presented.
-
- (2) Find NEXT? (y/n - or x --> Yes and don't ask)
- Y will go to the next occurrence of the string and repeat (1).
- N will end the "search and replace" feature of PC-TYPE+.
- X will make the substitution at all subsequent locations in the
- file.
-
- Press the PgDn Key
-
- It's that easy. Incidentally, if at any point you want to STOP
- the Find and Replace process, press the ESC key. ----
- -----------------
-
-
- If you want to replace the string in a similar fashion toward the
- beginning of the file, you merely start the instruction on the Command
- Line with a minus sign. Place the cursor on the asterisk below.─┐
- │
- ┌───────────────────────────────────────────────────────────────┘
- │ Then press the Esc key to move the cursor to the Command Line and
- │ type:
- │ -/cccc/DDD/ (When this line is on the bottom, press PgDn)
- │
- │ then press the Enter key and answer the question by pressing the
- │ X key.
- cccc Cccc cCcc ccCc cccC CCCC
- (*)
-
-
-
-
- (PRESS the PgDn key again!)
-
-
-
-
-
- As you saw above, the string to be replaced would be found regardless
- of case in either direction.
-
- If you wanted to distinguish between eeee and Eeee, the only
- difference you would need to make on the Command Line would be to
- replace the '/' characters with '\' characters. For example,
-
- \The\For\
-
- on the Command Line would replace every occurrence of "The" with "For"
- toward the end of the file. A string "the" would not be recognized
- as a find string.
-
- Similarly, to replace all the "The"s with "For"s toward the beginning
- of the file, you would type
-
- -\The\For\ on the Command Line.
-
- Press the PgDn Key
-
-
-
-
- Place the cursor on the asterisk below and press the Esc key to go to
- the Command Line. On the Command Line type:
-
- \Ffff\Ggg\
-
- and press the Enter key.
-
- Answer the question with X. Notice that only those strings which
- are IDENTICAL in case to Ffff are changed to Ggg.
-
-
- (*)
-
-
-
-
- Ffff fFff ffFf fffF Ffff ffff (Press F4 to return to the Help Menu)