HP 3000 Manuals

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


HP EDIT Reference Manual

Global Search And Replace Forward 

Purpose 

Searches forward to the end of the file and replaces text.

Default Syntax 

ESC }

Description 

This command searches forward in the file and replaces all occurrences of
the current search pattern with the current replacement pattern.  The
command functions virtually the same as the Search And Replace Forward
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 should 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.

   2.  Ensure that the cursor is positioned at the top of the file if you
       want HP EDIT to search through the entire file.

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

          *   Searches forward through the file for all occurrences of
              text that match the search pattern

          *   Replaces all occurrences of matched text with the
              predefined replacement pattern

          *   Displays X occurrences were replaced on the message line,
              where X equals the number of occurrences of the search
              pattern that were replaced

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 forward 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.

Related Commands 

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



MPE/iX 5.0 Documentation