MPE/iX Shell and Utilities Reference Manual, Vol 2
regexp(3) MPE/iX Shell and Utilities regexp(3)
regexp∗
A regular expression regexp followed by * matches a string of zero or more strings
that would match regexp. For example, A* matches A, AA, AAA and so on. It also
matches the null string (zero occurrences of A).
regexp+
A regular expression regexp followed by + matches a string of one or more strings
that would match regexp.
regexp?
A regular expression regexp followed by ? matches a string of one or zero occur-
rences of strings that would match regexp.
char{n}
char\{n\}
In this expression (and the ones to follow), char is a regular expression that stands for
a single character (for example, a literal character or a period (.)). Such a regular
expression followed by a number in brace brackets stands for that number of repeti-
tions of a character. For example, X\{3\} stands for XXX. In Basic regular expres-
sions, in order to reduce the number of special characters, { and } must be escaped
by the \ character to make them special, as shown in the second form (and the ones
to follow).
char{min,}
char\{min,\}
When a number, min, followed by a comma appears in braces following a single-
character regular expression, it stands for at least min repetitions of a character. For
example, X\{3,\} stands for at least three repetitions of X.
char{min,max}
char\{min,max\}
When a single-character regular expression is followed by a pair of numbers in
braces, it stands for at least min repetitions and no more than max repetitions of a
character. For example, X\{3,7\} stands for three to seven repetitions of X.
regexp1|regexp2
This expression matches either regular expression regexp1 or regexp2.
(regexp)
\(regexp\)
This lets you group parts of regular expressions. Except where overridden by paren-
theses, concatenation has the highest precedence. In Basic regular expressions, in or-
der to reduce the number of special characters, ( and ) must be escaped by the \
character to make them special, as shown in the second form.
Miscellaneous Information 3-35