next previous up contents index
Next: NRLOCATE Previous: NEXT Up: The Commands in Detail


NLOCATE   [col1 [col2]] [/string/[H][I]]
NL

Related command: RNLOCATE/NRLOCATE, also LOCATE and RLOCATE

NLOCATE is used to search for the nearest line not containing the specified character string. As parameter you specify a character string. The character string normally has to be surrounded by two delimiters. Above, the slash (`/') is used as delimiter but any other character is permissible. In practice, the special character on the lower right of the keyboard has proved to be effective. You only have to use another character if the character string contains the special character. You may omit the delimiter at the end of the character string if the rest of the input line is empty.

searches for the nearest line down in the text that does not contain the character string `abc';

searches for the nearest line down in the text that does not contain the character string `a/b';

searches for the nearest line down in the text that does not contain the character string `bc' because `a' is the delimiter at the beginning of the character string and the final delimiter is missing. Entering the command line nl abca would also result in a search for the nearest line not containing the character string `bc'.

Please mind the final delimiter when concatenating commands:

searches the nearest line down in the text that does not contain the character string `abc' and then executes the command -2 while

would launch a search for lines not containing the string `abc ;-2'.

The search always starts at the record after the one in the current line.

If a line that does not contain the specified character string is detected, that line is put into the current line; the visible section of the workfile is moved appropriately.

If exaEdit could not find a line without the character string, the following message is generated:

for the ... the character string specified is in the output; the current line remains unchanged.

If exaEdit has found the character string in the last record of the workfile, the search continues at the first record, normally. The search goes on until either the character string is not found or the record from which the search started is reached again, without success. Above, `normally' includes that the switch manipulated by WRAP is turned ON.

To inform you that the search has been continued at the beginning of the workfile, the message

is generated. This message is followed either by the positioning of the current line when the string is not found in a line or by the message of failure mentioned above.

Contrasting, if WRAP OFF is valid, the search ends at the last workfile record. If it was not successful, i.e. the character string is in every line searched, exaEdit generates the messages

Frequently it will be necessary to launch searches for the same character string more than once. Then it is sufficient to enter NLOCATE without parameters; the last character string that has been searched for is used automatically.

The commands NLOCATE, RNLOCATE/NRLOCATE, LOCATE and RLOCATE use the same character string. The character string to be searched for 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 as long as the given area does not contain the search string completely. 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 NLOCATE 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 NLOCATE with a (new) column restriction after another NLOCATE will use the same search string as the first NLOCATE.

You can search data in hexadecimal form by giving the parameter

To this end, the given character string must be written in hexadecimal form. Since 1 byte is always defined by 2 hexadecimal characters, exaEdit always demands that the amount of the entered hexadecimal characters is even. Otherwise exaEdit will generate the error message Entering a character that is not hexadecimal results in the error message If, for example, the next record not containing a tab sign (hexadecimal 09) should be found, the command could be used.

When the parameter

( = `case-insensitive') is given, the search for the character string will be case insensitive (i.e. no distinction between lower and upper case characters). This means that can find records that contain neither ab nor Ab nor aB nor AB.

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.


next previous up contents index
Next: NRLOCATE Previous: NEXT Up: The Commands in Detail