Using Regular Expressions with the Pipe Symbol
The
except
,find
, andmatch
filters used with the pipe symbol employ regular expressions to filter output. Juniper Networks uses the regular expressions as defined in POSIX 1003.2. (See Table 12.) If the regular expression contains spaces, operators, or wildcard characters, enclose the expression in quotation marks.
For example, if a command produces the following output:
1 22 23 2 14A pipe filter of
| match 2
displays the following output:1 22 23 2 1A pipe filter of
| except 1
displays the following output:2 24For more examples of using regular expressions, see the following sections: