The except, find, and match 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 15.) If the regular expression contains spaces, operators, or wildcard characters, enclose the expression in quotation marks.
Table 15: Common Regular Expression Operators in Operational Mode Commands
For example, if a command produces the following output:
- 1 2
- 2 2
- 3 2 1
- 4
a pipe filter of | match 2 displays the following output:
- 1 2
- 2 2
- 3 2 1
and a pipe filter of | except 1 displays the following output:
- 2 2
- 4
![]() |
Note: See the following sections for more examples of using regular expressions: |