HP 3000 Manuals

Global Search And Replace Backward [ HP EDIT Reference Manual ] MPE/iX 5.0 Documentation


HP EDIT Reference Manual

Global Search And Replace Backward 

Purpose 

Searches backward to the beginning of the file and replaces text.

Default Syntax 

ESC {

Description 

This command searches backward in the file and globally replaces all
occurrences of the current search pattern with the current replacement
pattern.  [REV BEG]The Global Search And Replace Forward[REV END] command
functions essentially the same as the Search And Replace Backward command
with the + option.

In order for this command to perform its function, you must define a
search pattern using the Define Search Pattern or Define Search Pattern
From Text command.  You [REV BEG]must[REV END] also define a replacement
pattern using the Define Replace Pattern or Define Replace Pattern From
Text command.

Procedure 

To search for and replace text globally: 

   1.  Predefine the search and replace patterns using the Define Search
       Pattern and Define Replace Pattern commands.
       [REV BEG]

   2.  If you want HP EDIT to search through the entire file, make sure
       the cursor is positioned at the bottom of the file.  If you want
       HP Edit to search through a block of text you have selected,
       position the cursor within the block.[REV END]

   3.  Press ESC, then press the { key.  HP EDIT:

          a.  Searches backward through the file for all occurrences of
              text that match the search pattern.

          b.  Replaces all occurrences of matched text with the
              predefined replacement pattern.

          c.  Displays X occurrences were replaced on the message line,
              where X equals the number of occurrences replaced
[REV BEG]

To search for and replace text within a selected block: 

   1.  Predefine the search and replace patterns using the Define Search
       Pattern and Define Replace Pattern commands.

   2.  Select a block of text.

   3.  Press ESC, then press the { key.  HP EDIT:

          a.  Searches backward through the block for all occurrences of
              text that match the search pattern.

          b.  Replaces all occurrences of matched text with the
              predefined replacement pattern.

          c.  Displays X occurrences were replaced on the message line,
              where X equals the number of occurrences replaced.
[REV END]

Related Commands 

       Define Replace Pattern
       Define Replace Pattern From Text
       Define Search Pattern
       Define Search Pattern From Text
       Global Search And Replace Forward
       Insert Replace Pattern
       Insert Search Pattern
       Search And Replace Backward
       Search And Replace Forward
       Search Backward
       Search Forward



MPE/iX 5.0 Documentation