A Target as a Simple String Expression
You can specify a target as one or more characters, that is, a string, contained in a file line. The editor looks for the string, making the first line that contains it the target line.
If you specify the string target alone or as the operand of a LOCATE subcommand, the line containing the string becomes the new current line. If the string target is an operand of one of the other XEDIT subcommands, the line that contains the string determines the range of the subcommand's execution.
The string must be enclosed in delimiters, which can be any character that does not appear in the string itself. However, if you use one of the following special characters as a delimiter, you must also specify a search direction (+ or –): plus (+), minus (–), not (¬), or period (.). The search direction is explained under Specifying a Search Direction.
====> /whatever/ This means, beginning with the line following the current line, search for the string ‘whatever’ and make the line that contains it the new current line.
====> delete /whatever/ This means, delete all lines from the current line up to, but not including, the line that contains ‘whatever’.
- Determine the direction of the search
- Search for a line that does not contain a given string
- Search for any of several strings