NRLOCATE|RNLOCATE [col1 [col2]] [/string/[H][I]] NRL|RNL
Related command: NLOCATE, also RLOCATE and LOCATE
NRLOCATE searches backwardly for the nearest line not containing
the character string specified (reverse search).
As parameter you specify a character string. The character string has
to be put in delimiters, normally. Above, the slash
(`/
') is
used as delimiter; any other character is allowed as well. In practice,
the special key on the lower right on your keyboard has proved to be
useful. You only need a different delimiter if the character you have
got used to is part of the character string specified. The delimiter at
the end of the character string is omittable if the rest of the
command line remains empty.
nrlocate /abc/
launches a backward search for the nearest line not containing the
character string `abc
';
nrl -a/b-
launches a backward search for the nearest line not containing the
character string `a/b
';
nrl abc
launches a reverse search for the nearest line not containing the
character string `bc
' because `a
' is
the delimiter at the beginning and the delimiter at the end is missing.
nrl abca would also launch a reverse search for the
nearest line that does not contain the character string
`bc
'.
Please mind the final delimiter when concatenating commands:
nrl /abc/;-2
reversely searches the nearest line that does not contain the string
`abc
' and then executes the command
-2 while
nrl /abc ;-2
backwardly searches the nearest line not containing the string
`abc ;-2
'.
The search starts at the record before the one in the current line.
If the nearest line that does not contain the specified character string is found, that line is positioned into the current line. The section of the workfile displayed in the window is moved correspondingly.
If exaEdit cannot find a line not containing the requested string, the message
Character string in all records: ...
appears; the ... are replaced by the specified character string; the current line remains unchanged.
If exaEdit finds the character string in every record until the first record of the workfile has been reached, the search continues at the last record, normally. The search goes on until either the character string is found or the record from which the search started is reached without success, again. In the sentence above, `normally' means that the switch manipulated by WRAP (compare the entry for WRAP) is turned ON.
To show that the search has continued at the end of the workfile, exaEdit generates the message
Search from end (wrap)
This message is followed by either the positioning of the workfile section on the display or the message of failure mentioned above.
In contrast, if WRAP OFF is valid, the search ends at the first record of the workfile if the character string could not be identified. If the character string is there in every record that has been checked, these messages appear:
Begin of data
Character string in all records: ...
Frequently, it will be necessary to search for the same character string several times. Then it is enough to enter the command NRLOCATE without parameters; the last character string that has been searched for is used automatically.
The commands NRLOCATE, RNLOCATE, NLOCATE, LOCATE and RLOCATE use the same character string. The character string is the same for any workfile.
By default, the complete record will be searched. By giving two column numbers as first parameters the search is restricted to that area. A record will then be found if the given character string is not or not completely contained within the area. If only one column number is given, the search area goes from that column to the end of the record. The command ZONE can also be used for column restrictions (see description). When both ZONE and the column number parameters are in effect, the latter one precedes.
If NRLOCATE is used a second time, and then without any parameters, possible column restrictions are still in effect. But if a new search string is given, the restrictions are no longer in effect. A NRLOCATE with a (new) column restriction after another NRLOCATE will use the same search string as the first NRLOCATE.
You can search in hexadecimal form by giving the parameter
H
Odd number of hex characters
Wrong hex character
nrlocate /09/ h
When the parameter
I
nrlocate /ab/ i
If you have to use the parameter I regularly, the use of the command CASE is recommended. CASE can force other commands to act as if the parameter I was given. For further information see CASE.