nsr_regexp(5)
nsr_regexp(5)
NAME
nsr_regexp - regular expression syntax
DESCRIPTION
This manual page describes the regular expression handling used in Net-
Worker. The regular expressions recognized are described below. This
description is essentially the same as that for ed(1).
A regular expression specifies a set of strings of characters. A mem-
ber of this set of strings is said to be matched by the regular expres-
sion.
Form Description
1. Any character except a special character matches itself. Spe-
cial characters are the regular expression delimiter plus a
backslash(\), brace([), or period(.) and sometimes a carat(^),
asterik(*), or dollar symbol($), depending upon the rules below.
2. A . matches any character.
3. A \ followed by any character except a digit or a parenthesis
matches that character.
4. A nonempty string s, bracketed string [s] (or [^s]) matches any
character in (or not in) s. In s, \ has no special meaning and
] may only appear as the first letter. A substring a-b, with
aandb in ascending ASCII order, stands for the inclusive range
of ASCII characters.
5. A regular expression of form 1 through 4 followed by * matches a
sequence of 0 or more matches of the regular expression.
6. A bracketed regular expression x of form 1 through 8, \(x\),
matches what x matches.
7. A \ followed by a digit n matches a copy of the string that the
bracketed regular expression beginning with the nth \(x\)
matched.
8. A regular expression x of form 1 through 8 followed by a regular
expression y of form 1 through 7 matches a match for x followed
by a match for y, with the x match being as long as possible
while still permitting a y match.
9. A regular expression of form 1 through 8 preceded by ^ (or fol-
lowed by $), is constrained to matches that begin at the left
(or end at the right) end of a line.
10. A regular expression of form 1 through 9 picks out the longest
among the leftmost matches in a line.
11. An empty regular expression stands for a copy of the last regu-
lar expression encountered.
SEE ALSO
ed(1), nsr_client(5)
NetWorker 7.6.2 Jul 14, 11 nsr_regexp(5)