HP 3000 Manuals

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


HP EDIT Reference Manual

Search Backward 

Purpose 

Searches backward for text matching the search pattern.

Default Syntax 

[n] \

where n is a count indicating the nth previous occurrence of the search
pattern.  The default value of n is 1.

Description 

This command searches from the current cursor location toward the top of
[REV BEG]a file or block of text[REV END] for text that matches the
search pattern.

Command Process 

When HP EDIT finds text that matches the search pattern:

   *   Text scrolls down, if necessary

   *   The cursor moves to the first character of the matched text

   *   The entire matched text is highlighted (if the Highlight Match
       parameter of the Set Options screen is enabled)

   *   The message Found.  appears

You can execute this command repeatedly.  Each time you execute the
command, HP EDIT responds to matched text as described.  If you execute
the command and no remaining text matches the search pattern, HP EDIT
displays Not found.  on the message line and sounds the terminal bell.

Requirements 

In order for this command to perform its function, you must predefine a
search pattern using either the Define Search Pattern command, Define
Search Pattern From Text command, or the Define Search Pattern From Macro
command.

Procedure 

To sequentially search backward for the search pattern: 

   1.  Ensure that the cursor is positioned anywhere after the search
       pattern, or move the cursor to the bottom of the file.

   2.  Press the \ key, or press the Search/Replace function key,
       followed by the Search Backward function key.  If any of the text
       in the file matches the search pattern, HP EDIT moves the cursor
       to the first character of the matched text and highlights the
       entire matched text.

[REV BEG]

To sequentially search backward within a block for the search pattern: 

   1.  Ensure that the cursor is positioned within the block.

   2.  Go to step 2, above.
[REV END]

To search backward for a specific occurrence of the search pattern: 

   1.  Specify a count that represents the nth previous occurrence of the
       search pattern that you want HP EDIT to find from the current
       cursor location.

   2.  Press the \ key, or press the Search/Replace function key,
       followed by the Search Backward function key.  HP EDIT moves the
       cursor to the first character of the nth occurrence and highlights
       the entire matched text.

Related Commands 

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



MPE/iX 5.0 Documentation